Commit Graph

13 Commits

Author SHA1 Message Date
Ilia Ross
4af613a1a1 Fix API restriction preservation comment 2026-10-24 16:51:32 +02:00
Ilia Ross
04b47e5815 Add API-only access for Webmin accounts
This PR adds an `api_only` global permission that restricts a Webmin account to one supported API endpoint, such as virtual-server/remote.cgi.

External integrations need credentials that can call an API without also granting access to the Webmin interface or generic RPC. Existing module permissions do not provide this endpoint-level restriction. The new setting allows administrators to create dedicated integration accounts while Webmin continues performing authorized operations through its privileged backend.

The restriction is enforced in two places:
- MiniServ checks the authenticated account's policy before dispatching CGI, static-file, DAV, or WebSocket requests. Requests outside the configured endpoint receive HTTP 403.
- `init_config` requires the permitted CGI to explicitly opt in before initialization. This also protects Webmin-initializing CGIs hosted by another web server.

Generic RPC is denied for API-only accounts, even when an existing RPC permission would otherwise allow it. The endpoint's own module and operation permissions still apply. Selecting an endpoint does not grant permission to execute every API command.

Webmin Users gains an API-only setting for users and groups. Existing restrictions survive ordinary edits, resets, copies, cloning, renaming, group propagation, and cluster synchronization. Clearing a restriction requires an explicit permission edit. Group updates preserve restrictions already assigned to individual members.

MiniServ reads the policy on each request from the account's existing storage backend: local files, MySQL, PostgreSQL, or LDAP. Policy-read errors deny access instead of treating the account as unrestricted.

Validation passed with the four separately submitted supporting fixes (#2897, #2898, #2899, #2900) ,applied: 169 focused tests, syntax checks, and live Debian tests using file-backed and PostgreSQL accounts. Live checks covered account creation, lifecycle operations, both CGI modes, sessions, RPC, static files, DAV, and WebSockets.

The supporting fixes remain separate PRs. This API-only branch currently has seven lifecycle test failures that depend on the file-cache and group ACL cleanup fixes landing.
2026-10-23 22:06:12 +02:00
Ilia Ross
8f725f63c6 Fix new lines 2026-07-14 02:58:54 +02:00
Ilia Ross
99f35fa38a Fix to move URL download destination controls to global ACL 2026-07-14 02:52:36 +02:00
Jamie Cameron
d41377983e Move the option that controls if a user can accept RPC calls out of the global ACL and into a more findable location in the Edit User page 2026-05-16 12:16:29 -07:00
Jamie Cameron
1a86501e88 Delete code and languages related to email feedback feature that is no longer linked to, or useful
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-15 16:51:34 -07:00
Jamie Cameron
60a9bc010c Code cleanup 2026-05-15 16:46:30 -07:00
Jamie Cameron
e09fccf402 Fix variable declaration 2015-12-12 16:13:07 -08:00
Jamie Cameron
d32ac11bfb Global ACL option to disable webmin search 2009-12-28 23:12:30 -08:00
Jamie Cameron
9dbd5db2c9 Fix permissions 2009-07-20 23:42:32 -07:00
Jamie Cameron
7a821d4f5b Use new module 2009-03-11 21:17:01 +00:00
Jamie Cameron
3f19c8f296 Added option to not grant new permissions to users 2008-12-10 02:08:37 +00:00
Jamie Cameron
fc1c1b243f Initial checkin of Webmin 2007-04-12 20:24:50 +00:00