Skip to content

Commit a41e466

Browse files
authored
Explain how to authenticate to the now running control plane. (#8977)
1 parent 8349ed9 commit a41e466

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

dev-tools/omicron-dev/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ impl RunAllArgs {
159159
"omicron-dev: privileged user name: {}",
160160
cptestctx.user_name.as_ref(),
161161
);
162+
println!("omicron-dev: privileged password: {}", cptestctx.password);
162163

163164
// Wait for a signal.
164165
let caught_signal = signal_stream.next().await;

docs/how-to-run-simulated.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,17 @@ Once everything is up and running, you can use the system in a few ways:
307307
* Use the browser-based console. The Nexus log output will show what IP address and port it's listening on. This is also configured in the config file. If you're using the defaults with `omicron-dev run-all`, you can reach the console at `http://127.0.0.1:12220/projects`. If you ran a second Nexus using the `config-second.toml` config file, it will be on port `12222` instead (because that config file specifies port 12222). Depending on the environment where you're running this, you may need an ssh tunnel or the like to reach this from your browser.
308308
* Use the xref:cli.adoc[`oxide` CLI].
309309

310+
You can authenticate using a username of `test-privileged` and a password of `oxide`.
311+
312+
If the console endpoints are returning a 404 run `cargo xtask download console`.
313+
314+
Initiate a cli login using
315+
316+
[source,text]
317+
----
318+
$ oxide auth login --host http://localhost:12220
319+
----
320+
310321
== Running with TLS
311322

312323
When you run the above, you will wind up with Nexus listening on HTTP (with no TLS) on its external address. This is convenient for debugging, but not representative of a real system. If you want to run it with TLS, you need to tweak the above procedure slightly:

nexus/test-utils/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ pub struct ControlPlaneTestContext<N> {
193193
pub initial_blueprint_id: BlueprintUuid,
194194
pub silo_name: Name,
195195
pub user_name: UserId,
196+
pub password: String,
196197
}
197198

198199
impl<N: NexusServer> ControlPlaneTestContext<N> {
@@ -454,6 +455,7 @@ pub struct ControlPlaneTestContextBuilder<'a, N: NexusServer> {
454455

455456
pub silo_name: Option<Name>,
456457
pub user_name: Option<UserId>,
458+
pub password: Option<String>,
457459

458460
pub simulated_upstairs: Arc<sim::SimulatedUpstairs>,
459461
}
@@ -503,6 +505,7 @@ impl<'a, N: NexusServer> ControlPlaneTestContextBuilder<'a, N> {
503505
blueprint_sleds: None,
504506
silo_name: None,
505507
user_name: None,
508+
password: None,
506509
simulated_upstairs: Arc::new(sim::SimulatedUpstairs::new(
507510
simulated_upstairs_log,
508511
)),
@@ -1103,6 +1106,7 @@ impl<'a, N: NexusServer> ControlPlaneTestContextBuilder<'a, N> {
11031106
self.internal_client = Some(testctx_internal);
11041107
self.silo_name = Some(silo_name);
11051108
self.user_name = Some(user_name);
1109+
self.password = Some(TEST_SUITE_PASSWORD.to_string());
11061110
self.server = Some(server);
11071111
}
11081112

@@ -1476,6 +1480,7 @@ impl<'a, N: NexusServer> ControlPlaneTestContextBuilder<'a, N> {
14761480
initial_blueprint_id: self.initial_blueprint_id.unwrap(),
14771481
silo_name: self.silo_name.unwrap(),
14781482
user_name: self.user_name.unwrap(),
1483+
password: self.password.unwrap(),
14791484
}
14801485
}
14811486

0 commit comments

Comments
 (0)