-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examplebroker without dbus policy #19
Conversation
fe7990e
to
1036bb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some comments, let me know what you think
* Rename files to be less verbose * Update lock strategy on IsAuthorized to prevent read races on isAuthorizedCalls map * Update StartBus func to have a better blocking and cancelling mechanism
After the previous changes, it's not longer necessary to configure the examplebroker bus on the system.
Now the daemon executes its own system bus and exports the broker on it.
3e3bb05
to
6ee887d
Compare
I think we need to create a new Jira card to fix this branch behaviour. I see a lot of issues with it:
So, basically, if you run this binary right now on a production system even just for testing, you are breaking it (also, the example broker is not available outside of the env variable)
didrocks@casanier:~/work/authd$ ./authd
Mock system bus started on unix:path=/tmp/authd-system-bus-mock4169769742/bus.sock
didrocks@casanier:~/work/authd$ No error, immediately exits.
I think this should be revisit with this goal in mind:
Does it make sense? |
Well, this definitely was a misunderstanding then. I expected this code only to be used during development (and while we still don't have integration tests), as we were always running the |
Sorry, there is probably something I’m missing then, how do you run the production code right now? The one not spawning this additional dbus daemon, loading system brokers and keeping not cleaning them up? It seems there is only one binary to me here, no? |
Yeah, this is the only binary. I expected this change to be temporary (during this early stage of development) and that's why I did it like this. I didn't know we wanted to keep the option to run the |
Yeah, I think we are at a stage of development now where we should not introduce technical debts (temporary things that we will remove), since transitioned the PAM module to something more robust and definitive. I think the example broker will always be there (just not compiled) in the binary for our own manual testing without breaking any user’s machine. The fact in the example broker case to only load it (+local ofc), is not an issue, as this is really to be able to mainly test the rest of the logic manually (pam module, database, soon hopefully gdm and other in session cases…) I’m not on the mock broker use case, but this one should have a similar logic to run on its own bus, right? Maybe we should have both mechanism in common, wdyt? (a way to run everything with mock for tests and its own bus, independent from machine’s config seems really similar to using the example broker, with its own bus, independent from the machine’s config). |
I'll wait for #22 to be merged, as it changes some things in the daemon that will be very useful for us here. Then I'll get started on this right away. |
The current implementation of the examplebroker dbus service requires that we configure it in the system in order for it to work.
These changes should improve the current behavior by making the cmd/main func create its own bus and then exporting the broker on that bus instead.
Also, some quality of life improvements were made in order to properly clean up the system after the tests are done.
UDENG-1159