We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c4269b commit 9b36d4eCopy full SHA for 9b36d4e
src/rmmtxauthz/web/mediamtx.py
@@ -23,6 +23,10 @@ async def get_auth(authreq: MTXAuthReq) -> Response:
23
if authreq.password != dbuser.mtxpassword:
24
LOGGER.error("Wrong password for {}".format(authreq.user))
25
raise HTTPException(status_code=403)
26
+ # Operations that require admin privileges
27
+ if authreq.action in ("api", "metrics", "pprof") and not dbuser.is_rmadmin:
28
+ LOGGER.error("{} is not admin requesting {}".format(authreq.user, authreq.action))
29
+ raise HTTPException(status_code=403)
30
return Response(status_code=204)
31
except (NotFound, Deleted) as exc:
32
LOGGER.error("Invalid user {}: {}".format(authreq.user, exc))
0 commit comments