Skip to content

Conversation

plotnick
Copy link
Contributor

@plotnick plotnick commented Sep 4, 2025

In addition to producing signatures over a technician port unlock challenge via ssh-agent, also support online signature and response generation via permslip (with authn by ssh-agent). See oxidecomputer/permission-slip#252.

Comment on lines 1972 to 1983
let mut permslip = Command::new("permslip")
.arg("sign")
.arg(key_name)
.arg("--sshauth")
.arg("--kind=tech-port-unlock-challenge")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::inherit())
.spawn()
.context(
"unable to execute `permslip`, is it in your PATH and executable?",
)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll defer to others but I have a light preference to also allow overloading the path via environment variable e.g. PERMSLIP if I need to test something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, added in 68df5ec.

Comment on lines 423 to 431

/// Unlocks the tech port if the challenge and response are compatible
fn unlock(
&mut self,
vid: Self::VLanId,
challenge: UnlockChallenge,
response: UnlockResponse,
time_sec: u32,
) -> Result<(), MonorailError>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the advantage of moving this into the trait? Is this to avoid the extra monorail step?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not worked in this code base before, so it may just be a mistake. But I was guided by the module-level doc-comment //! Behavior implemented by both real and simulated SPs. I figured that with oxidecomputer/omicron#8994, the trait would now be the right place for this operation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing techport unlock is a monorail command e.g. https://github.com/oxidecomputer/rackletteadm/blob/c27d99ad8558f61bcbf2d7b92dfc1599b393c92d/scripts/common/unlock-techport.sh#L17 and is treated as a component action. My preference would be to keep that same behavior unless there's something speciically preventing us from continuing to use the monorail command. This trait would require changes in hubris. Can you implement a faux monorail command in the simulator?

Copy link
Contributor Author

@plotnick plotnick Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, removed from the trait in 9ddcf1e and pushed a corresponding update to oxidecomputer/omicron#8994.

Copy link
Contributor

@labbott labbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 572 to 580
/// Use the Online Signing Service with `permslip`
#[clap(
short,
long,
alias = "online",
conflicts_with = "list",
requires = "key"
)]
permslip: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make permslip conflict with ssh_auth_sock at the clap level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, added in b79fe36.

@plotnick plotnick merged commit f35429b into main Oct 1, 2025
18 of 20 checks passed
@plotnick plotnick deleted the tech-port-unlock branch October 1, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants