Okta: Connect Restore Orgs
Who can use this feature
Anyone with these permissions: Manage restore connections (Cloud workloads, SaaS applications)
Connecting a restore org lets you bring a deleted or changed object, such as a user, group, or app, back from a snapshot, instead of rebuilding it and its assignments by hand in Okta. A restore org is the Okta org that Eon writes the recovered objects into.
This article explains how to connect an Okta org as a restore org, including how to create the Okta app that Eon restores through.
Connect a restore org
In this procedure, you’ll generate a signing key in Eon, create an Okta app that signs in with it, and enter the app’s Client ID in Eon.
You can connect a restore org from the SaaS applications page in the Eon console.
Before you start
Before you connect an Okta restore org, make sure:
-
You can sign in to the Okta org as a Super Administrator. Only a Super Administrator can grant API scopes and admin roles to an app.
-
The org’s URL is on an Okta-owned domain:
.okta.com,.oktapreview.com,.okta-emea.com,.okta-gov.com,.oktagov.com, or.okta.mil. Custom domains aren’t supported. -
To use Bash or Terraform, you have an Okta API token that you created while signed in as a Super Administrator, under Security → API → Tokens. Eon never receives the token, so you can revoke it once the app is set up.
-
To use the Bash script,
bash,curl, andjqare installed on the machine that runs it.
Enter the Okta org
-
Go to Settings → Restore connections → SaaS applications, click New Connection, and select Connect Okta. The Configure Okta restore wizard opens.
-
In Organization URL, enter the address your users sign in at, such as
https://acme.okta.com. Use the Okta org that the snapshots you want to restore came from. Don’t enter the Admin Console address, which ends in-admin. -
Enter a Restore account name, then click Continue.
Generate the signing key
Eon generates the key pair and shows the public key (JWK); the private key never leaves the customer’s Eon scanning account.
-
Click Generate signing key. The wizard shows the public key (JWK).
-
Keep the wizard open until you create the restore org. Each run of the wizard generates a new key, so the Okta app must use the public key shown in the run you finish.
Create the Okta app
Create an API Services app for restoring, separate from the app you created for the source org. You can use Bash, Terraform, or the manual procedure. All three create the same app. Under Set up the Okta app, the Bash and Terraform options show the snippet filled in with your Organization URL and public key.
Bash
Terraform
Copy the snippet from the wizard’s Bash option and run it in a terminal, which downloads okta_restore.sh and runs it with --org-url and --jwk.
The script asks for your API token with hidden input, or reads it from the OKTA_API_TOKEN environment variable.
You can run the script again: it finishes a run that stopped halfway, and a run on a finished app changes nothing.
Bash script options
-
--org-url: the Okta org URL. -
--jwk: the public key (JWK) from the wizard. -
--app-name: the app’s name in Okta. The default isEon Restore. -
--dry-run: reads the org and prints the changes the script would make, without making them. A dry run still needs the API token. -
--help: lists the options, scopes, and admin role.
The Bash script and the Terraform module create the app, add the public key, grant the required and optional scopes, and assign the Super Administrator role.
When the app is ready, click Continue.
You can now restore users, groups, apps, and configuration into this Okta org. For instructions, see the restore articles listed in Okta Support. An Okta Workflows restore doesn’t write to the org: it produces an import file that you import into Okta Workflows yourself. For instructions, see Restore Okta Workflows.
Eon doesn’t check for the Super Administrator role or the optional scopes when you create the restore org, so the connection can succeed and a later restore of an object that needs one of them can fail. For the messages Eon shows when the connection fails, see Troubleshooting.
Create the Okta app manually
Use this procedure to create the restore app in the Okta Admin Console instead of using Bash or Terraform. Follow it in place of the script or Terraform in step 3 of the connection procedure, then return to the wizard.
Create the API Services app
-
Sign in to the Okta Admin Console as a Super Administrator.
-
Go to Applications → Applications and click Create App Integration.
-
Select API Services and click Next.
-
Name the app, such as
Eon Restore, and click Save.
Add the public key
-
On the app’s General tab, click Edit under Client Credentials.
-
Set Client authentication to Public key / Private key, and keep Save keys in Okta.
-
Click Add key, paste the public key (JWK) from the wizard, and click Done.
-
Click Save.
Grant the scopes
On the Okta API Scopes tab, click Grant next to each of these scopes:
-
Required:
okta.orgs.read,okta.users.manage,okta.groups.manage, andokta.apps.manage. Eon checks these scopes when you create the restore org. -
Optional:
okta.networkZones.manage,okta.userTypes.manage, andokta.policies.manage. They let Eon restore network zones, user types, and policies. Group rules are restored withokta.groups.manage. An Okta Workflows restore needs no scope, because it only builds an import file.
Without an optional scope, Eon still restores users, groups, and apps, and fails only the objects that need the missing scope.
Assign the Super Administrator role
On the app’s Admin roles tab, click Edit assignments, select Super Administrator, and click Save Changes.
Okta checks the app’s admin role as well as its scopes on every call. Only a Super Administrator can change app sign-in and profile enrollment policies, or the priority of any policy.
Troubleshooting
When a connection fails, Eon shows one of these messages.
The Okta app is missing Okta API scopes
The issue
Eon shows the message The Okta app is missing the Okta API scopes <list>; grant them on the app's Okta API Scopes tab and connect again.
The fix
On the app’s Okta API Scopes tab in Okta, click Grant next to each scope that the message lists. Then click Create restore account again.
Okta refused the requested scopes
The issue
Eon shows the message Okta refused the requested scopes; grant the Okta app the Okta API scopes <list> and connect again.
The fix
On the app’s Okta API Scopes tab in Okta, grant the four required scopes: okta.orgs.read, okta.users.manage, okta.groups.manage, and okta.apps.manage.
Then click Create restore account again.
The Okta app has no admin role that can read the organization
The issue
Eon shows the message The Okta app has no admin role that can read the organization; assign it the <role> role on the app's Admin roles tab and connect again.
The fix
On the app’s Admin roles tab in Okta, assign the Super Administrator role, even if the message names a different role. Then click Create restore account again.
Invalid Okta credentials or organization URL
The issue
Eon shows the message Invalid Okta credentials or organization URL.
The fix
Check the Organization URL, the Client ID, and that the public key in the Okta app is the key the wizard shows. Then click Create restore account again.
Failed to validate the Okta organization
The issue
Eon shows the message Failed to validate the Okta organization; check the signing key and try again.
The fix
Check that the public key in the Okta app is the key the wizard shows. Then click Create restore account again.
Okta API returned an HTTP error
The issue
Eon shows the message Okta API returned HTTP <code>.
Okta throttled the request or returned a server error.
The fix
Wait, then click Create restore account again.
Okta signing key was not found
The issue
Eon shows the message Okta signing key was not found.
Eon can’t find the signing key for this connection.
The fix
Open the wizard again, generate a new signing key, and add the new public key to the Okta app. Then click Create restore account again.