<div dir="ltr"><div class="gmail_quote">(apologies to moderator, I messed up subscribing and have a couple copies of this waiting in the moderation queue that may be deleted)</div><div class="gmail_quote"><br><div dir="ltr">I have some polkit questions that I have not been able to find good answers for after reading the docs and googling around.<div><br></div><div>We are hoping to use polkit in several backend daemons running on an embedded linux box. We have a web interface as well as ssh access. From our webserver we need to make dbus calls to the backend services. From ssh access we have cli apps that would make the same backend service calls.</div><div><br></div><div>It's fairly clear how we can set up polkit rules to authorize the cli applications to make calls.</div><div><br></div><div>What is less clear is how we can use polkit to authorize the calls from the webservice. Any help would be appreciated!</div><div><br></div><div>The webserver would be running as an unprivileged process in a container/namespace such that it has access to dbus socket and nothing else. We'll be using PAM for authentication of incoming user requests and session creation.</div><div><br></div><div>It seems like we could create our own authentication agent and have the webserver use a connection to the authentication agent to validate the user. Just reading docs in preparation for a prototype now, so have not tried any code, but it looks like it may be difficult to correlate incoming requests, backend dbus calls, and authentication requests. Also, we allow oauth and openid connect for authentication/authorization, so there may not be local user accounts for each request. It looks like a local NSS module may be a way to resolve that.<br><br>So far, it's pretty confusing as there doesnt seem to be much in the way of documentation or examples for how this should work.<br><br>I'd like to protect against the threat of webserver attacks being used to call backend dbus calls that should not be allowed, as well as unify our security model between local console access and remote access.</div><div><br></div><div>Any advice or direction would be greatly appreciated.</div></div>
</div></div>