Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 0 additions & 43 deletions openapi/wicketd.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,33 +446,6 @@
}
}
},
"/rack-setup/config/recovery-user-password-hash": {
"put": {
"summary": "Update the RSS config recovery silo user password hash.",
"operationId": "put_rss_config_recovery_user_password_hash",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PutRssRecoveryUserPasswordHash"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/reload-config": {
"post": {
"summary": "Instruct wicketd to reload its SMF config properties.",
Expand Down Expand Up @@ -2342,11 +2315,6 @@
"minLength": 1,
"maxLength": 63
},
"NewPasswordHash": {
"title": "A password hash in PHC string format",
"description": "Password hashes must be in PHC (Password Hashing Competition) string format. Passwords must be hashed with Argon2id. Password hashes may be rejected if the parameters appear not to be secure enough.",
"type": "string"
},
"Oui": {
"description": "An Organization Unique Identifier.",
"type": "array",
Expand Down Expand Up @@ -3176,17 +3144,6 @@
},
"type": "string"
},
"PutRssRecoveryUserPasswordHash": {
"type": "object",
"properties": {
"hash": {
"$ref": "#/components/schemas/NewPasswordHash"
}
},
"required": [
"hash"
]
},
"RackInitUuid": {
"x-rust-type": {
"crate": "omicron-uuid-kinds",
Expand Down
8 changes: 4 additions & 4 deletions wicket/src/cli/rack_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ use wicket_common::rack_setup::BgpAuthKeyInfo;
use wicket_common::rack_setup::BgpAuthKeyStatus;
use wicket_common::rack_setup::DisplaySlice;
use wicketd_client::types::GetBgpAuthKeyParams;
use wicketd_client::types::NewPasswordHash;
use wicketd_client::types::PutRssRecoveryUserPasswordHash;
use wicketd_commission_types::rack_setup::BgpAuthKey;
use wicketd_commission_types::rack_setup::BgpAuthKeyId;
use wicketd_commission_types::rack_setup::CertificatePem;
use wicketd_commission_types::rack_setup::CertificateUploadResponse;
use wicketd_commission_types::rack_setup::NewPasswordHash;
use wicketd_commission_types::rack_setup::PrivateKeyPem;
use wicketd_commission_types::rack_setup::PutRecoveryUserPasswordHash;
use wicketd_commission_types::rack_setup::PutRssUserConfigInsensitive;
use wicketd_commission_types::rack_setup::SetBgpAuthKeyStatus;
use zeroize::Zeroizing;
Expand Down Expand Up @@ -144,9 +144,9 @@ impl SetupArgs {
let hash = NewPasswordHash(hash.to_string());

slog::info!(log, "uploading password hash to wicketd...");
client
commission_client
.put_rss_config_recovery_user_password_hash(
&PutRssRecoveryUserPasswordHash { hash },
&PutRecoveryUserPasswordHash { hash },
)
.await
.context("failed to upload password hash to wicketd")?;
Expand Down
1 change: 0 additions & 1 deletion wicketd-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ bootstrap-agent-lockstep-types.workspace = true
dropshot.workspace = true
gateway-client.workspace = true
omicron-common.workspace = true
omicron-passwords.workspace = true
omicron-uuid-kinds.workspace = true
omicron-workspace-hack.workspace = true
schemars.workspace = true
Expand Down
15 changes: 0 additions & 15 deletions wicketd-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,6 @@ pub trait WicketdApi {
params: TypedBody<GetBgpAuthKeyParams>,
) -> Result<HttpResponseOk<GetBgpAuthKeyInfoResponse>, HttpError>;

/// Update the RSS config recovery silo user password hash.
#[endpoint {
method = PUT,
path = "/rack-setup/config/recovery-user-password-hash"
}]
async fn put_rss_config_recovery_user_password_hash(
rqctx: RequestContext<Self::Context>,
body: TypedBody<PutRssRecoveryUserPasswordHash>,
) -> Result<HttpResponseUpdatedNoContent, HttpError>;

/// Reset all RSS configuration to their default values.
#[endpoint {
method = DELETE,
Expand Down Expand Up @@ -315,11 +305,6 @@ pub struct GetBgpAuthKeyParams {
pub check_valid: BTreeSet<BgpAuthKeyId>,
}

#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct PutRssRecoveryUserPasswordHash {
pub hash: omicron_passwords::NewPasswordHash,
}

#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct GetInventoryParams {
/// Refresh the state of these SPs from MGS prior to returning (instead of
Expand Down
17 changes: 0 additions & 17 deletions wicketd/src/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,6 @@ impl WicketdApi for WicketdApiImpl {
Ok(HttpResponseOk(GetBgpAuthKeyInfoResponse { data }))
}

async fn put_rss_config_recovery_user_password_hash(
rqctx: RequestContext<Self::Context>,
body: TypedBody<PutRssRecoveryUserPasswordHash>,
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
let ctx = rqctx.context();

let mut config = ctx.rss_or_multirack_join_config.lock().unwrap();

let rss_config = config.rss_config_mut_or_conflict(
"cannot put recovery user password when not preparing for RSS",
)?;

rss_config.set_recovery_user_password_hash(body.into_inner().hash);

Ok(HttpResponseUpdatedNoContent())
}

async fn delete_rss_config(
rqctx: RequestContext<Self::Context>,
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.