Skip to content

Commit 0f106c4

Browse files
authored
sync up various TODOs with issues (#2417)
1 parent cb3d713 commit 0f106c4

File tree

21 files changed

+23
-35
lines changed

21 files changed

+23
-35
lines changed

common/src/api/external/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,6 @@ impl JsonSchema for RoleName {
480480
/// can fail (if the value is larger than i64::MAX). We provide all of these for
481481
/// consumers' convenience.
482482
// TODO-cleanup This could benefit from a more complete implementation.
483-
// TODO-correctness RFD 4 requires that this be a multiple of 256 MiB. We'll
484-
// need to write a validator for that.
485-
// /
486483
//
487484
// The maximum byte count of i64::MAX comes from the fact that this is stored in
488485
// the database as an i64. Constraining it here ensures that we can't fail to

common/src/sql/dbinit.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1788,7 +1788,6 @@ CREATE TABLE omicron.public.device_auth_request (
17881788
);
17891789

17901790
-- Access tokens granted in response to successful device authorization flows.
1791-
-- TODO-security: expire tokens.
17921791
CREATE TABLE omicron.public.device_access_token (
17931792
token STRING(40) PRIMARY KEY,
17941793
client_id UUID NOT NULL,

nexus/db-model/src/device_auth.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ fn generate_token() -> String {
7575
/// suggested in RFC 8628 §6.1 (User Code Recommendations); q.v. also for
7676
/// a discussion of entropy requirements. On input, use codes should be
7777
/// uppercased, and characters not in this alphabet should be stripped.
78-
// TODO-security: user code tries should be rate-limited
7978
const USER_CODE_ALPHABET: [char; 20] = [
8079
'B', 'C', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S',
8180
'T', 'V', 'W', 'X', 'Z',

nexus/src/app/device_auth.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ impl super::Nexus {
118118
message: "device authorization request expired".to_string(),
119119
})
120120
} else {
121-
// TODO-security: set an expiration time for the valid token.
122121
self.db_datastore
123122
.device_access_token_create(
124123
opctx,

nexus/src/app/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub(crate) const MAX_DISKS_PER_INSTANCE: u32 = 8;
6363

6464
pub(crate) const MAX_NICS_PER_INSTANCE: usize = 8;
6565

66-
// TODO-completness: Support multiple external IPs
66+
// TODO-completeness: Support multiple external IPs
6767
pub(crate) const MAX_EXTERNAL_IPS_PER_INSTANCE: usize = 1;
6868

6969
pub(crate) struct ExternalServers {

nexus/src/app/sagas/instance_migrate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async fn sim_instance_migrate(
194194
}
195195
let source_nat = SourceNatConfig::from(snat_ip.into_iter().next().unwrap());
196196

197-
// The TODOs below are tracked in
197+
// The TODO items below are tracked in
198198
// https://github.com/oxidecomputer/omicron/issues/1783
199199
let instance_hardware = InstanceHardware {
200200
runtime: runtime.into(),

nexus/src/app/silo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ impl super::Nexus {
517517
// silo_user_password_verify().
518518
// TODO-security There may still be some vulnerability to timing attack
519519
// here, in that we'll do one fewer database lookup if a user does not
520-
// exist.
520+
// exist. Rate limiting might help. See omicron#2184.
521521
let fetch_user = self
522522
.datastore()
523523
.silo_user_fetch_by_external_id(

nexus/src/bin/nexus.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
//! Executable program to run Nexus, the heart of the control plane
66
77
// TODO
8-
// - TCP and HTTP KeepAlive parameters
98
// - Server hostname
109
// - Disable signals?
11-
// - Analogs for actix client_timeout (request timeout), client_shutdown (client
12-
// shutdown timeout), server backlog, number of workers, max connections per
13-
// worker, max connect-in-progress sockets, shutdown_timeout (server shutdown
14-
// timeout)
10+
// - General networking and runtime tuning for availability and security: see
11+
// omicron#2184, omicron#2414.
1512

1613
use clap::Parser;
1714
use omicron_common::cmd::fatal;

nexus/src/db/datastore/role.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,6 @@ impl DataStore {
236236
where
237237
T: authz::ApiResourceWithRolesType + AuthorizedResource + Clone,
238238
{
239-
// TODO-security We should carefully review what permissions are
240-
// required for modifying the policy of a resource.
241239
opctx.authorize(authz::Action::ModifyPolicy, authz_resource).await?;
242240

243241
let authz_resource = authz_resource.clone();

nexus/src/db/fixed_data/silo_user.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lazy_static! {
1313
/// local development
1414
// TODO-security Once we have a way to bootstrap the initial Silo with the
1515
// initial privileged user, this user should be created in the test suite,
16-
// not automatically at Nexus startup.
16+
// not automatically at Nexus startup. See omicron#2305.
1717
pub static ref USER_TEST_PRIVILEGED: db::model::SiloUser =
1818
db::model::SiloUser::new(
1919
*db::fixed_data::silo::SILO_ID,
@@ -47,7 +47,7 @@ lazy_static! {
4747
/// Test user that's granted no privileges, used for automated testing
4848
// TODO-security Once we have a way to bootstrap the initial Silo with the
4949
// initial privileged user, this user should be created in the test suite,
50-
// not automatically at Nexus startup.
50+
// not automatically at Nexus startup. See omicron#2305.
5151
pub static ref USER_TEST_UNPRIVILEGED: db::model::SiloUser =
5252
db::model::SiloUser::new(
5353
*db::fixed_data::silo::SILO_ID,

0 commit comments

Comments
 (0)