oxidecomputer / oxidecomputer/omicron

v1 session management security work

Open
#341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

mvp security
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

This is a catch-all for v1 session management security work, largely inspired by the OWASP Session Management Cheat Sheet.

  • HSTS
  • "Secure", "HttpOnly", "SameSite" cookie attributes
  • Server-side expiration
  • Idle timeout
  • Absolute timeout
  • Cache settings to avoid leaking sensitive data
  • If we get a 500 during session create (e.g., due to duplicate key, which should be impossible) sure we're not leaking info in the error message about the nature of the failure
  • Review the cheat sheet and figure out what's missing
  • Server side: log session lifetime
  • Scope sessions to the same source IP (and maybe other request properties)
  • Server side: prevent DoS by unauthenticated clients by spamming random session ids. This one deserves more explanation. I'm a little worried that if even unauthenticated requests hit CockroachDB, it's easy to DoS the control plane by just hammering Nexus with unauthenticated requests. We could mitigate this in a lot of ways. The easiest one I can think of is to severely throttle clients that have made more than a handful of requests with bogus session ids in the last few minutes. It seems like we could be very aggressive about this because well-behaving clients should rarely make requests with bogus session ids. Other ideas might be: use a separate CockroachDB cluster for this or use a separate mechanism altogether.
  • Consider specifying a particular CSPRNG for token generation instead of than rand::StdRng (currently ChaCha12)

Contributor guide

Open the contributing guide

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.

Research direction

No file, test, or entry point is named; start by reviewing the OWASP Session Management Cheat Sheet and locating the v1 session-management implementation. Narrow the catch-all to one unchecked requirement, define its acceptance criteria, and verify that item before considering the work done.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.