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

[Feature] Setting DisplayName and ProfilePicURL for headscale users #2166

Open
1 of 2 tasks
vikanezrimaya opened this issue Oct 2, 2024 · 1 comment
Open
1 of 2 tasks
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed no-stale-bot

Comments

@vikanezrimaya
Copy link

Use case

Mostly for niceness and completeness. I would like Headscale to know users by name, so that tailscale whois (and related solutions such as tailscale-nginx-auth) can know the user's display name and profile picture.

The OIDC rework document mentioned that CLI-based login should be able to populate these fields, so I hope the maintainers won't mind me filing this as an issue so it could be easily trackable (and to show that this is in fact desirable, and bikeshed over the minute details of the implementation).

Additionally, I may try my hand at implementing this. (I don't really know Go that well, but how hard could it be?)

Description

One or two commands in the Headscale CLI to set the user's display name and the profile picture. Optionally a way to set these fields on user creation.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

Exact subcommand/option names subject to bikeshedding.

$ headscale users set -i 1 --display-name "Vika" --profile-pic-url "https://example.com/vika.png"
$ # Additionally, consider the following, to create a user and set their personal data in one step:
$ headscale users create vika --display-name "Vika" --profile-pic-url "https://example.com/vika.png"

Alternatively:

$ headscale users set-display-name -i 1 Vika
$ headscale users set-profile-pic-url -i 1 https://example.com/vika.png
@vikanezrimaya vikanezrimaya added the enhancement New feature or request label Oct 2, 2024
@kradalby
Copy link
Collaborator

kradalby commented Oct 4, 2024

Yes please, I was hoping someone would pick it up so I would appreciate if you want to try to do this :)

You will need to implement the gRPC/API part as part of this, and I think your first example looks nicer for both API and CLI.

--email would also be sensible as I've already thought that it might be nice to do a fallback to services like Gravatar if there is no picture available.

@kradalby kradalby added no-stale-bot help wanted Extra attention is needed good first issue Good for newcomers labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed no-stale-bot
Projects
None yet
Development

No branches or pull requests

2 participants