Add ability to create app passwords for a user in management UI

At the moment, an admin can set the main password for a user, but cannot set up app-specific passwords. To do this, the user needs to log in and set them up themselves.

I would very much like the ability to set up app-passwords from the user management page as well as the user having that ability.

You can set them using the stalwart cli I think…

1 Like

I don’t think you can. Only end users can create app passwords for themselves for now

You definitely can’t set user app-pwds using stalwart-cli or WebGUI. The only way I figured out is to login as a user using curl, keep the token and perform other actions with it.

Well, this only works when you have scripted your user creation since you need to know the initial password (and/or 2FA as well).

I have not made it through and gave up on this, so my users need to do this fairly complex task on their own (a lot of them can’t) or admins will need to do this manually using the users’ credentials which may be a bad idea.

Please implement!

You can use impersonation as a workarround. Login to /account using [email protected]%admin (and the admin password), and then create app password from there

My bad - I’m using SSO via external OIDC Provider. Sorry for missing this info.

As far as I know impersonation only works with stalwart-local auth?!

I’m on the same boat. Had some issues geting impersonation to work (see Impersonation doesn't work with OIDC on /account - #12 by dani ) but you can use the recovery admin and use impersonation

1 Like

I am not sure if I want to restart my stalwart container with recovery admin just to add stuff for a new user :slight_smile: (which might happen frequently).

I think we’d both appreciate some solution that can easily be done with admin privileges and is fully automizable via stalwart-cli or otherwise.

If you use a database allowing concurrent access (postgres, mariadb, fondationdb), you can spawn a dedicated instance for recovery

Are you sure you can’t already use the CLI for this? It looks likes its available: AppPassword | Stalwart

In newer versions of Stalwart it appears this is possible: AppPassword | Stalwart

This is only for the currently logged user. The feature request is to be able to do this as an admin, for other users

I can do this as an “admin” via the UI by going to Accounts → click on the user you want to add a password for → Authentication → Credentials → App password for third-party applications.

Is there something I’m missing?

Yes, you’re missing the last step : try to save, and you’ll get this

1 Like

You can use the API and CLI to create, but not the UI. Still the same in Stalwart v1.
It’s worse now, as previously I was using a workaround to log in to a “service account” using an app password I created, and added app passwords there, but now I should either do it programmatically or follow the SSO one-time code procedure to get in.
I’d really appreciate it if this feature were implemented.