Skip to content

[Bug] api for preauthkeys doesn't work properly #3369

Description

@ChxGuillaume

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Ince the re implementation in c9bbb5b the behavior of the POST /api/v1/preauthkey route doesn't work the intended way

When giving a username it doesn't work like before and returns a 400 Bad Request
proto: (line 1:9): invalid value for uint64 field user: "email@example.com"

Expected Behavior

It should create and return the preauthkey

Steps To Reproduce

  1. POST on /api/v1/preauthkey with a correct username for the property "user"
  2. Should return an error similar to proto: (line 1:9): invalid value for uint64 field user: "email@example.com"

Environment

- OS: Ubuntu 22.04 / Docker
- Headscale version: 0.29.x (tested on .1 and .2)
- Tailscale version: (On API so not relevent for this issue)

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

Running on any standard Headscale instance in 0.29.2, this is an API issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions