galene icon indicating copy to clipboard operation
galene copied to clipboard

Are wildcard-users possible?

Open TechnologyClassroom opened this issue 8 months ago • 6 comments

In https://github.com/jech/galene/issues/199 I posted an old group config that used several different wildcard passwords that controlled permissions. The config has changed since then, but is it possible to control permissions with different passwords using the new config format?

This config does much of the same as that old config such as

  • Allowing wildcard users with wildcard passwords to chat
  • Forbidding empty usernames
  • Forbidding people from giving away op or present passwords

This config does not allow several people with the op or present password to customize their username to differentiate themselves from one another.

{
    "users":{
        "": {},
        "op": {"password":"disinfectsroadworkausterity", "permissions": "op"},
        "present": {"password":"pavilionEurodollarcosigners", "permissions": "present"},
        "disinfectsroadworkausterity": {"password":"98989898989898", "permissions": "observe"},
        "pavilionEurodollarcosigners": {"password":"98989898989898", "permissions": "observe"}
    },
    "wildcard-user": {"password": {"type": "wildcard"}, "permissions": "message"},
    "allow-recording": false,
    "auto-subgroups": true,
    "public": false
}

Is there a way to set multiple different wildcard-user configs so that I do not need to create op and present passwords for everyone that needs those permissions? Instead of setting op and present users, I would like to have several wildcard-user configs.

Something like this:

    "wildcard-users":{
        "config1": {"password": "pavilionEurodollarcosigners", "permissions": "present"},
        "config2": {"password": "disinfectsroadworkausterity", "permissions": "op"},
        "config3": {"password": {"type": "wildcard"}, "permissions": "message"}
    },

Is this functionality already possible somehow and I missed it or can this functionality be added back?

TechnologyClassroom avatar Mar 14 '25 02:03 TechnologyClassroom

No, it is no longer possible.

can this functionality be added back?

It could be added back. The main issue is how to represent multiple wildcard users in the REST API, https://galene.org/README.API.html

jech avatar Mar 14 '25 14:03 jech

I see. I'm glad I'm not just messing up the config.

If I find someone willing to develop this feature, would the inclusion of this feature be likely added if the implementation meets your standards?

TechnologyClassroom avatar Mar 14 '25 15:03 TechnologyClassroom

Sure. The feature is not difficult to add, you just need to change the WildcardUser field in descriptions to an array called WildcardUsers, and replace the test at the bottom of getPasswordPermissions to a loop.

The issue is what to do with backwards compatibility: you don't want to break the config files of all users, so you'll need to add some compatibility code to upgradeDescription. And you'll need to decide how to represent it in the REST API.

jech avatar Mar 14 '25 18:03 jech

Cool. That helps! I'll see what I can drum up.

TechnologyClassroom avatar Mar 14 '25 20:03 TechnologyClassroom

Are you still working on this, or do you want me to do it?

jech avatar Apr 12 '25 09:04 jech

I have asked around, but no one seemed interested enough to jump on it.

TechnologyClassroom avatar Apr 12 '25 17:04 TechnologyClassroom