< 302020-12-01⋎02 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
01:42*paul121[m] has quit (Ping timeout: 246 seconds)
01:42*paul121[m] has joined
01:42symbioquine[m]paul121: I think I blew away that environment since then, but it shouldn't be hard to retest. It sounds like you're describing the opposite problem I was encountering.
01:43symbioquine[m]I was observing that the default `farm` oauth client could be used for an Authorization Code grant with ***any*** redirect url.
01:51symbioquine[m]or perhaps I'm not reading that issue correctly...?
01:53paul121[m]Yeah you're right. It is different. I tried it in a fresh environment and the issue I linked to above doesn't happen
01:53paul121[m]Pinning down the jwt library at 3.3.3 prevents league/oauth2-server 8.2 from installing, which is where that bug was introduced
01:54paul121[m]Makes me wonder if we should run some of the simple_oauth tests inside our tests. Just because these things once get noticed as frequently in their repo unless people are running the tests :-/
01:55paul121[m]* Makes me wonder if we should run some of the simple_oauth tests inside our tests. Just because these things wont get noticed as frequently in their repo unless people are running the tests :-/
01:57paul121[m]If farmOS were installed with league/oauth2-server v8.2 it would have broken the oauth functionality for clients w/o a redirect uri
01:59symbioquine[m]Broken would be a much better outcome in this case.
02:00paul121[m]I guess this is an issue for any dependency of a dependency that releases breaking changes when they shouldn't 😅
02:01symbioquine[m]It sounds like that might be the case with the issue you were mentioning. I'm not sure we have enough information to say what the cause of the one I described is...
02:02paul121[m]Yep I agree!! That behavior seems to have been there for a while
03:17symbioquine[m]Just reproduced the behavior again. The relevant versions are `league/oauth2-server=8.1.1`, `drupal/simple_oauth=5.0.2`, `lcobucci/jwt=3.3.3`
03:18*posted a file: composer.lock (367KiB) < matrix.org/_matrix/media/r0/download/mat >
03:20symbioquine[m]The "test case" I'm using is; do a standard installation with the dev docker image, log in, then paste this into the url bar "localhost/oauth/authorize?response_type="
03:22symbioquine[m]If the test case "fails" it will have redirected to some.random.domain/?code=some-really-lon
03:24symbioquine[m]I believe the correct behavior would be for an error to be returned saying the Authorization Code grant flow is not supported for the `farm` client id, or an error saying that the domain `some.random.domain` is not allowed to request the Authorization Code grant flow.
03:25symbioquine[m]In the failing state, I believe it would represent a pretty big security issue.
03:29paul121[m]oh yes! sorry I thought you were referring to the 401 instead of 400 error
03:30symbioquine[m]Yeah, sorry if that was confusing. I've discovered at least two issues with oauth in farmOS 2.x at this point. :)
03:31symbioquine[m]I think the one associated with [this issue](github.com/thephpleague/oauth2-server/is) is already tracked in the right place.
03:32symbioquine[m]However, the one I just described above does not yet have a tracking issue that I know of.
03:35paul121[m]definitely! I forgot to test this today
03:36paul121[m]want to open an issue?
03:36symbioquine[m]Sure
03:38paul121[m]Just tried it really quick and am seeing the same
03:38paul121[m]but don't have much time to dig in
03:38paul121[m]does make me curious if it is related to the "requiring a redirect_uri" issue, though
03:39symbioquine[m]Maybe, but it's a really bad failure mode in that case :)
03:39paul121[m]there was a bug when an empty array was returned, so they made the requirement to add a redirect_uri.. but this behavior wasn't mentioned
03:39paul121[m]yeah haha
03:40paul121[m]if I set a redirect URI I see that the Authorization Code auth to a "random" domain fails, is that the same for you?
03:44symbioquine[m]Yeah, it gives an error "Fatal error. Unable to get the authorization server."
03:45symbioquine[m]But I believe having a domain set does not yield the desired behavior for the resource owner grant flow right?
03:47symbioquine[m]There's also this UI bug in simple_oauth;
03:47*uploaded an image: image.png (48KiB) < matrix.org/_matrix/media/r0/download/mat >
03:49paul121[m]Hmm I'm not sure I've tried that. But I think it should work with a redirect uri configured, even if it isn't necessary?
03:50paul121[m]Good question tho
03:50paul121[m]That issue is actually documented in their issues!
03:51paul121[m]Well.. documented isn't correct
03:51paul121[m]There's an open issue for that :-)
03:55symbioquine[m]Opened www.drupal.org/project/farm/issues/31857
03:57symbioquine[m]I just tested and the Resource Owner grant flow actually does still work even with the redirect uri constrained to "example.com/".
04:18paul121[m]Hmm yeah I'm not sure what expected behavior would be for that. I think in the oauth2_server module for D7 had it configurable if the redirect_uri needed to match for the resource owner/password flow
04:21symbioquine[m]the oauth2_server module also allowed per-client-id whitelisting of which grant flows were allowed.
04:22symbioquine[m]So it would have been possible to only allow the resource owner flow.
04:23symbioquine[m] * the oauth2_server module also allowed per-client-id whitelisting of which grant flows were permitted.
04:25symbioquine[m]mstenta: You might find [this](github.com/symbioquine/farmOS_wfs/blob/2) interesting. It makes the browser output from the tests a downloadable artifact; e.g. github.com/symbioquine/farmOS_wfs/action
04:31symbioquine[m]<symbioquine[m] "the oauth2_server module also al"> It also seems to have the sane behavior where no whitelisted redirect uris for a client id means it doesn't allow any flows which require redirection - for that client id.
04:44symbioquine[m]<symbioquine[m] "image.png"> Here's the issue for the UI bug; www.drupal.org/project/simple_oauth/issu
12:07mstenta[m]Wow just catching up on all this
12:07mstenta[m]TL;DR?
14:55paul121[m]Need to look into the issue symbioquine opened
14:55paul121[m]> Opened www.drupal.org/project/farm/issues/31857
14:56paul121[m]we could patch that UI bug as well. Its been open for a long time, I was hoping it would get merged. maybe we just need to bump up the issue
15:36*uploaded an image: 99013315-0b533a00-2505-11eb-8b4f-7685f18fba93.png (32KiB) < matrix.org/_matrix/media/r0/download/mat >
15:36paul121[m]custom icons
16:06paul121[m]we were chatting about icons this morning
16:07paul121[m]mstenta mentioned this project that is going to develop royalty free food/agriculture icons: ourfood.world/foodicons/
16:07paul121[m]maybe we can use them one day :D
16:08mstenta[m]I was thinking... maybe we should design and submit one specifically for a farmOS logo :-)
16:08mstenta[m]What would look good in a hexagon and represent farmOS? Ideas?
16:08mstenta[m](thinking it would still be alongside the existing "farmOS" text logo)
16:09mstenta[m](but could be used as a square-aspect ratio logo/icon in certain contexts)
16:13mstenta[m]As much of a cliche as it is, I feel like a leaf/seedling icon is the best all around fit for farmOS :-)
16:13mstenta[m]Tractor... barn... etc are other ideas, but feel too limiting. farmOS is more than that :-)
16:13mstenta[m]So maybe we can just adopt one of the icons they create as our own haha
16:14wombat83[m]<mstenta[m] "Tractor... barn... etc are other"> What if those things are in the corners of the hexagon with the farm OS logo at the center of the hexagon linked with spokes?
16:14mstenta[m]oh that's an idea
16:15mstenta[m]i think the FoodIcons design guidelines are relatively strict/simple... might be hard to fit something in when the icon is very small
16:15wombat83[m]I know it might be difficult to get the icon details into a small logo but it might be worth trying maybe putting icons of food or farming equipment into the corners of the hexagon
16:15mstenta[m]oh but... it makes me thing...
16:15mstenta[m]hexagons fit together well...
16:16mstenta[m]perhaps we create a splash image on the farmOS website with the farmOS hexagon in the middle and tractor, barn, etc ones around it :-)
16:17paul121[m]wow yes.... every module gets an icon & you build your hexagon puzzle
16:18mstenta[m]oooooh :-)
16:18paul121[m]we also need a fun 404 page
16:18mstenta[m]Ah cool I just checked the guidelines doc and it says Feb 14 is the deadline for the "final refinements phase", followed by an "approval phase" after that... so maybe these icons WILL be available before the release of farmOS 2.x :-)
16:18mstenta[m]hahaha yes. yes we do need a fun 404 page
16:19mstenta[m]i mean... maybe what we REALLY need is a mascot haha
16:19mstenta[m]like octocat
16:19mstenta[m]github.com/404
16:20wombat83[m]Muscular field mouse? 🐁
16:20mstenta[m]hahaha
16:20mstenta[m]oh man a mouse is a great idea haha
16:21mstenta[m]goat is also an option! goatech.org
16:24symbioquine[m]...maybe the kinglet?
16:24symbioquine[m]en.wikipedia.org/wiki/Kinglet
16:25mstenta[m]ooh i like that too!
16:26*uploaded an image: image.png (78KiB) < matrix.org/_matrix/media/r0/download/mat >
16:52symbioquine[m]mstenta: What do you think about copying [these lines](github.com/farmOS/farmOS/blob/2bce16f9fc) into the prod Dockerfile? It would make it easier to build a "user test-runner" image with the uid/gid set to match the dev one...
16:52symbioquine[m]Obviously with the default value set to match the current default of 33.
16:53mstenta[m]Oh sure I don't see why not?
16:54symbioquine[m]Cool :)
16:57mstenta[m]Curious how we'd use that in practice specifically?
16:59mstenta[m]We'd be able to move the `--build-arg WWW_DATA_ID=33` flag in `run-tests.yml` to the `farmos/farmos:2.x` image build... but that's pretty negligible.
17:00mstenta[m]In the context of contrib modules... ideally we don't need to build the image at all, because that makes the action take longer to run.
17:00mstenta[m]So I don't think we'd be able to use it in that context
17:01mstenta[m] * So I don't think we'd necessarily want to use it in that context
17:01mstenta[m]Are you thinking for local testing?
20:46mstenta[m]paul121: how did you go about customizing the icons in your screenshot above?
20:47mstenta[m]i'm working on the 2.x menu right now - thinking about swapping out the Drupal icon for the farmOS logo as a first step
20:47mstenta[m](is it just using the "logo" setting in the theme?)
20:52mstenta[m]Answer: yes it is just the "logo" setting :-)
20:52paul121[m]yup!
20:54paul121[m]the icons was just using css to set the `:before` background-image
20:55paul121[m]I know theres that whole deal about matching the color type, but you can just change the color of the icon if you're providing your own SVG
20:56paul121[m]rather than how Drupal has the same SVG saved in different colors (which must be the better way to go about it?)
20:56*sent a long message: < matrix.org/_matrix/media/r0/download/mat >
21:34paul121[m]symbioquine good find on the redirect bug.. even though there is an easy fix, it seems pretty important.. especially when `simple_oauth` provides a default client (just like we were doing). I made a test that recreates the behavior in simple_oauth: www.drupal.org/project/simple_oauth/issu

< 302020-12-01⋏02 >