Skip to content
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

Add special user-proxy mode #46

Merged
merged 7 commits into from
May 23, 2022
Merged

Add special user-proxy mode #46

merged 7 commits into from
May 23, 2022

Conversation

simo5
Copy link
Contributor

@simo5 simo5 commented May 3, 2022

This mode is to be used in a user session where what we want to proxy
is other applications run by the same user in a container or flatpak.
This allows those application to use the user's creedntials w/o having
to bind mount and expose the user TGT.
The configuration is fixed and simplified, and the user proxy is allowed
to be itself intercepted by the system proxy if desired.

fixes #45

@simo5 simo5 added the WIP Work in Progres label May 3, 2022
@simo5
Copy link
Contributor Author

simo5 commented May 3, 2022

May need to add a configure option to interpose by default so that the interposer within a container is enabled by default and does not require setting the GSS_USE_PROXY env var, but will still respect an explicit no setting to avoid looping

@simo5 simo5 force-pushed the userproxy branch 5 times, most recently from 054d585 to c5d5cd9 Compare May 5, 2022 13:02
@simo5 simo5 added enhancement New feature or request and removed WIP Work in Progres labels May 5, 2022
simo5 added 6 commits May 16, 2022 14:37
This mode is to be used in a user session where what we want to proxy
is other applications run by the same user in a container or flatpak.
This allows those application to use the user's creedntials w/o having
to bind mount and expose the user TGT.
The configuration is fixed and simplified, and the user proxy is allowed
to be itself intercepted by the system proxy if desired.

Use a subdirectory of XDG_RUNTIME_DIR by default
If an explicit socket name is passed we expect the directory structure
to be in place.

However if we are dealing with XDG_RUNTIME_DIR then we want to create a
subdirectory so that it can bind mounted in containers.
Bind mounting the socket directly is problematic if we want to allow to
restart the daemon as the socket may then become permanently
disconnected in the container.

If we use a subdirectory we need to attempt to create it on start
because XDG_RUNTIME_DIR is ephemeral and generally recreated from
scratch when the user session is created, so we need to populate it with
the needed dir strcuture ourself to make things simpler for users.

Signed-off-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Simo Sorce <simo@redhat.com>
This helps cases where only the client is needed, as it removes
a bunch of dependencies needed only by the proxy daemon itself.

Signed-off-by: Simo Sorce <simo@redhat.com>
Add Userproxy.md file that explains what user proxy mode is
and how/when to use it.
Add userproxy mode changes to manpages.

Signed-off-by: Simo Sorce <simo@redhat.com>
This way we can provide a user systemd unit that will automatically
starts gssproxy in user mode if someone tries to use the userproxy
socket.

Signed-off-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Simo Sorce <simo@redhat.com>
This changes the example file name from "mech" to proxymech.conf
and always installs this file. Downstreams have been already doing
this for a long time, might as well do it upstream as well.

Also tidy up install dirs when only the gss module is built.

Signed-off-by: Simo Sorce <simo@redhat.com>
@simo5
Copy link
Contributor Author

simo5 commented May 23, 2022

Manually tests with a modified flatpak that bind mounts the correct directories.
Works including socket activation. Merging, will handle any issues as followups

@simo5 simo5 merged commit bf92a59 into gssapi:main May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A "usermode" to use gssproxy with flatpaks
1 participant