Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

jackalctl will create invalid users #245

Open
SamWhited opened this issue Aug 12, 2022 · 3 comments
Open

jackalctl will create invalid users #245

SamWhited opened this issue Aug 12, 2022 · 3 comments
Labels

Comments

@SamWhited
Copy link
Collaborator

SamWhited commented Aug 12, 2022

  • Version: jackal version: v0.61.0
  • Platform: Linux 5.18.16-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 03 Aug 2022 11:25:04 +0000 x86_64 GNU/Linux
  • Subsystem: auth

No authentication using any SCRAM mechanism is ever successful for me. I have tried going back in the history (as far as v0.58.0) and haven't found a working commit. The issue appears to be that FetchUser passes in the username from the SCRAM properties. Ie. if we're authenticating with the JID me@example.net it will pass in me for the username, but in the database the user is me@example.net. If I instead do FetchUser(username+"@example.net") everything works fine.

EDIT: looking at this again, maybe this is correct and when I create the user using jackalctl it accepts me@example.net and thinks it's the username? I don't see how any user would be associated with a virtual host in that case though. I'm unsure if this is a bug in jackalctl allowing invalid user input or Jackal using the incorrect username.

@ortuman ortuman added the bug label Aug 13, 2022
@ortuman
Copy link
Owner

ortuman commented Aug 13, 2022

👋

I'm unsure if this is a bug in jackalctl allowing invalid user input or Jackal using the incorrect username.

That's the key.

The jackalctl command only expects username value as input, without domain. So for the above exposed example would look like this:

jackalctl user add me:somesecretpassword

Definitely this is some kind of bug.

@SamWhited
Copy link
Collaborator Author

If I have multiple domains, how would I choose what domain the user exists for in this case?

@SamWhited SamWhited changed the title Cannot authenticate as any user jackalctl will create invalid users Aug 15, 2022
@SamWhited
Copy link
Collaborator Author

Sounds like users exist for every single vhost. Nothing wrong with this I guess, but it's very unexpected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants