users: change roles, deactivate and reset the password of a local user through the API

Open
#2,229 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go

Research direction

Start with the /api/v2/users handlers and the existing user creation and trusted-issuer role update paths; the issue names no source files or tests. Define the PATCH /api/v2/users/{id} behavior for roles, is_active, and password, enforce write:user, audit changes as described in #2228, and protect each tenant’s last active admin. Done includes matching dexaflow auth commands and tests for these cases.

Written by the indexing model from the issue text.

Description

area/auth enhancement priority/p2

Problem

Found while writing the users, roles and tokens page (#2149). The API can create and list users (POST and GET /api/v2/users, dexaflow auth create-user), and the operator service API sets the roles of a trusted-issuer user, but nothing changes a local (password) user after it exists:

  • no call grants or removes a role;
  • no call deactivates or reactivates a user, although every authenticator already refuses an inactive one;
  • no call changes a password, apart from dexaflow reset-password for the Lite admin.

An admin who must take access away from a leaving colleague has to edit the database.

Proposal

PATCH /api/v2/users/{id} (or the Airflow FAB-compatible shape if the UI is to use it) taking roles, is_active and password, gated on write:user, each change audited (see #2228), with matching dexaflow auth commands. Deactivating must not be possible for the last active admin of a tenant.


Generated by Claude Code

Dominant language
Go
Stars
46
Forks
1
Avg merge
10h 43m
Merged PRs (30d)
587

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dexadata/dexaflow

All issues in dexadata/dexaflow

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.