Home / Developers / Sandbox walkthrough
Sandbox walkthrough
A guided scenario in your sandbox environment with the mock identity provider and the mock SCIM client. No real enterprise tenant needed.
What you need
Run the whole lifecycle against your sandbox environment without a real enterprise tenant: sign-in through a mock identity provider, provisioning and deprovisioning with a mock SCIM client, the back-channel logout and webhook that follow, and the evidence of enforcement. Everything here is sandbox only: the mock identity provider and the mock SCIM client hold synthetic users, and both refuse production.
avctl, the developer CLI. Coming — available at release: it will be released as signed binaries, with a Homebrew tap and a Scoop bucket, under names announced at release. The published build contains only the commands customers use:avctl mock scim,avctl sandbox mock-idp,avctl dev tokenandavctl --version.- A sandbox application with an organization, a client, and your application's logout and webhook endpoints. The quickstarts show the code.
- A Control API token for the application, and the Control API and SCIM base addresses of your sandbox environment.
1. Turn on the mock identity provider
export AV_CONTROL_TOKEN='<Control API token>' # environment only, never printed
export AV_CONTROL_BASE_URL="$SANDBOX_API_URL" # your sandbox Control API address
avctl sandbox mock-idp enable -app "$APPLICATION_ID" -org "$ORGANIZATION_ID" -protocol oidc
avctl sandbox mock-idp status -app "$APPLICATION_ID"enable turns on the mock identity provider for the application's sandbox environment, for OIDC, SAML or both (-protocol is repeatable; the default is oidc). avctl refuses any -environment other than sandbox before sending anything, and sends an Idempotency-Key with every change. The same operations are in the Control API: Enable the sandbox mock IdP, Get the sandbox mock IdP and Disable the sandbox mock IdP.
status shows engine_status: pending_engine until the mock identity provider is ready, then active with its issuer; failed with an engine_error_code; or disabled. It holds one synthetic test user.
2. Connect the organization to it
In the organization you named with -org, create a connection of the same protocol whose issuer is the issuer that status reported, with an account-matching (correlation) policy, for example the identity provider's employee_id matched to the SCIM externalId. Use the hosted setup portal, or the Control API: Create connection, Create correlation policy version, Activate correlation policy version and Activate connection. Then run enable again so the mock identity provider binds to the active connection.
The synthetic test user's matching value is sandbox-test-user. Its password is random: Reveal the test user's credentials rotates it and shows it once.
3. Provision the test user with the mock SCIM client
Issue a directory credential for the organization's SCIM directory with Issue directory credential; it is shown once. Then:
export AV_SCIM_TOKEN='<directory credential>' # environment only, never printed or committed
export AV_SCIM_BASE_URL="$SANDBOX_SCIM_URL" # your sandbox SCIM address
export AV_SCIM_DIRECTORY_ID="$DIRECTORY_ID"
avctl mock scim user create -user-name test.user -external-id sandbox-test-userYour webhook endpoint receives membership.created.
4. Sign in through the mock identity provider
Start sign-in from your application for that organization, as in the integration guide, and sign in as the synthetic test user. The ID token carries the organization's org_id and your tenant_id.
Cases worth trying: a wrong redirect_uri, a request without PKCE, and a user without a provisioned membership. With provisioning_mode scim_enforced, that last sign-in is refused.
5. Deprovision
avctl mock scim user deactivate -id "$SCIM_USER_ID" # deprovisions the user you signed in as
avctl mock scim user delete -id "$SCIM_USER_ID" # deleting a deactivated user is idempotent: 204, then 404What follows, at your endpoints and in AuthVertex:
- Your back-channel logout endpoint receives a logout token for the user's session; end it.
- Your webhook endpoint receives
membership.deprovisioned, signed and identified byevent_id. - A refresh or a new sign-in for the user is refused.
avctl mock scim scenario lifecycle -user-name <name> runs a whole cycle with a new synthetic user and prints each step: create, add to a group, remove from the group, deactivate, delete. avctl mock scim also has user get, user list, user reactivate, group create, group add-member, group remove-member and group delete.
6. Acknowledge and read the evidence
Report enforcement with Acknowledge revocation, using the revocation_id of the webhook, then read Get revocation and the user's evidence report with Principal evidence. The evidence shows when access was revoked, each delivery's state and your acknowledgment.
7. Test your endpoints
Finish with the conformance kit against the same endpoints.
Turn it off
avctl sandbox mock-idp disable -app "$APPLICATION_ID"