Skip to main content

Launch

The lab must be available and activated for your organization. Your server resolves learnerId and membership from the learner’s session. See learners and membership. Save deployment.id before you return. The tracking guide covers ownership checks, resuming, and duplicate launches.

Source IP

Some labs allow only the learner’s own address through their firewall. Pass the learner’s public IP as sourceIp:
Read it on your server from the incoming request, using the header your hosting provider sets. Never take it from the browser. Labs that do not use it ignore it, and an invalid address does not stop the launch.

Wait for the environment

Each lab has estimatedLaunchSeconds, its usual launch time, or null. Use it for wait copy such as “This lab usually takes about 4 minutes to start.” To keep server requests short, your browser can poll your own status route instead. That route calls getStatus() with the saved ID:
The lifecycle guide describes the states and the wait options.

Show connection details

A ready deployment has outputs, such as a console URL, a username and password, or access keys. Names and shapes vary by lab. normalizeOutputs unwraps them, drops values meant only for Cybr, and sorts them:

Render every output with rows

rows lists every output a learner should see, in the order they use them: where to connect, then sign-in details, then keys, then the rest.

Use the sorted fields

The same values are also grouped for custom layouts: Send outputs only to the learner who owns the deployment, and keep them out of logs and analytics.

End the lab

Closing the page or the terminal does not end the lab. Cybr also ends it at its time limit.