Skip to content
Least-privilege HTTP logs access: project:viewer metrics succeed but httpLogs is Not Authorized
truongbui86
OP

a month ago

We need the narrowest supported OAuth grant for HTTP logs in one dedicated QA project.

Our app requests only openid project:viewer and consent selected only the QA project. During the same valid one-hour grant, project lookup and CPU/RAM metrics succeeded while httpLogs returned Not Authorized. The grant has since expired normally; permissions have not been expanded.

Query: query PlatformHttp($deploymentId:String!,$limit:Int){httpLogs(deploymentId:$deploymentId,limit:$limit){timestamp path httpStatus totalDuration}}. The current QA runtime supplied the deployment ID; limit=500. The query matches the checked public railwayapp/cli schema.

Please confirm: Is project:viewer intentionally denied HTTP logs? Does project:member restricted to ONE QA project suffice, or is workspace membership required? Is there a logs-only/read-only option without deployment, settings or environment-variable authority? We seek guidance only; no resource, account, credential or production changes are authorized.

No project/service identifiers, logs, customer data, tokens, cookies or credentials are attached.

Solved

1 Reply

Railway
BOT

a month ago

Yes, that is expected. HTTP logs, like deployment and build logs, need member-level access to the project, while metrics only need viewer access, so project:viewer can read metrics but gets Not Authorized on httpLogs.

project:member with consent limited to just the QA project is enough. You don't need a workspace scope or workspace membership as long as that project is the one granted.

We don't offer a logs-only or read-only scope right now. Every log query needs member-level access, and that access level also includes member authority in the granted project.

One more thing about your query: the limit argument on httpLogs is ignored. To control how many rows come back, use beforeLimit / afterLimit, which accept up to 5,000 each, along with beforeDate, anchorDate or afterDate.


Status changed to Awaiting User Response Railway • about 1 month ago


Railway
BOT

24 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 24 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...