Skip to content

Access SO_PASSCRED credentials in handler #74

Description

@Natureshadow

While writing a backend for systemd-userdbd, which uses Varlink, I need to authorize user access to the Varlink service depending on the credentials passed over the Unix socket using SO_PASSCRED.

I am not sure how to best do that. Two options that come to mind are:

  • Pass the socket to the handler method – in that case, I could try to get the SO_PASSCRED message directly
  • Support SO_PASSCRED (and SO_PEERCRED) natively in the Varlink crate, and provide an interface to determine client credentials

Some advice or thoughts on how it could be done would be welcome.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions