juanfont/headscale

[Feature] Setting DisplayName and ProfilePicURL for headscale users

开放

#2,166 创建于 2024年10月2日

 (9 条评论) (9 个反应) (0 位负责人)Go (2,104 个派生)batch import
CLIenhancementgood first issuehelp wantedno-stale-bot

仓库指标

星标
 (38,374 个星标)
PR 合并指标
 (平均合并 1天 11小时) (30 天内合并 33 个 PR)

描述

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

贡献者指南