Skip to main content

Launch configuration

The lab must be available and activated for your organization. The server resolves learnerId and membership from its session and access policy. The optional sourceIp identifies the public IP of the learner. Some labs use it for firewall access. If the lab requires sourceIp, read it from trusted request metadata on your server. Do not trust a browser-provided address.

Save deployment ownership

Store the returned deployment.id with the learner session. Before later deployment requests, check that association. The SDK can create a handle for a saved ID:
deployments.get() makes no request. It does not check ownership.

Waiting for the environment to be ready

For shorter server requests, poll with getStatus() through your own application flow. Both methods use the same status endpoint. The lifecycle guide describes states and deadlines.

Show connection details

Outputs vary by lab. An output can be a bare value or a Terraform object with value, type, and sensitive.
Treat passwords, tokens, and keys as secrets even without the sensitive field. Show secret values only to the deployment owner.

Open a terminal

For terminal-enabled labs, create a session through the server SDK:
The terminal guide connects this session to a browser terminal.

End the environment

When the learner selects the end action, call destroy():
A closed page or terminal connection does not itself end the environment. Cybr also applies the lab time limit.