Okta: Connect Source Orgs
Who can use this feature
Anyone with these permissions: Manage source connections
Once an Okta org is connected and assigned to a backup policy, Eon backs up its users, groups, apps, and configuration. That lets you restore a deleted or changed object later, instead of rebuilding it in Okta by hand.
This article explains how to connect an Okta source org by creating an app in Okta that gives Eon read access, and then entering the app’s details in the Eon console.
Connect a source org
In this procedure, you’ll create an API Services app in Okta and connect the org to Eon with it. Eon signs in to Okta with OAuth 2.0 client credentials and a signed JSON web token (JWT), so there’s no client secret to copy.
You can connect a source org from the SaaS applications page in the Eon console.
Before you start
Before you connect an Okta source 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. -
You can create a custom admin role in Okta named Eon Backup - View admin assignments, unless you use the Bash script, which creates it. A backup fails with an error if the app lacks this role, and Eon doesn’t check for the role when you connect, so a connection can succeed and a later backup fail.
-
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.
-
To use the Bash script,
bash,curl, andjqare installed on the machine that runs it. -
To back up Okta Workflows, you can sign in to Okta Workflows as an Okta Super Administrator.
Enter the Okta org URL
-
On the SaaS applications page, select New Connection, then select Connect Okta. The Connect Okta wizard opens.
-
In Organization URL, enter the address your users sign in at, such as
https://acme.okta.com. Don’t enter the Admin Console address, which ends in-admin. Eon also accepts an address withouthttps://or with a trailing slash. -
Select 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.
Select Generate signing key. The wizard shows the Public key (JWK).
Each wizard run generates a new key, so add to Okta the key that your current wizard shows.
Create the Okta app
Create an API Services app in Okta that signs in with the public key. You can use a script, Terraform, or the Manual procedure. All three create the same app. The wizard’s Bash and Terraform options show the snippet filled in with your org URL and public key.
Bash
Terraform
Copy the snippet from the wizard’s Bash option and run it in a terminal, which downloads okta_source.sh and runs it with --org-url and --jwk.
The script creates the app, adds the public key, grants the read scopes and the okta.workflows.invoke.manage scope, assigns the Read-only Administrator role, and creates the custom role.
It asks for your API token with hidden input, or reads it from the OKTA_API_TOKEN environment variable, and it refuses a token passed as an argument.
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
Enter the Client ID
-
Copy the Client ID of the app. Find it in the script’s output, in the Terraform
client_idoutput, or on the app’s General tab in Okta. -
In Client ID, paste the Client ID, then select Next. The wizard fills in the key ID.
Choose whether to back up Okta Workflows
To back up the rest of the org without Okta Workflows, leave Back up Okta Workflows off and select Review. You can add Okta Workflows later, as Back Up Okta Workflows describes.
To back up Okta Workflows too, set up an export flow:
-
Turn on Back up Okta Workflows.
-
In Folders to back up, enter the number of top-level folders to back up, from 1 to 25. Eon backs up each folder with its nested folders.
-
Select Download export flow.
Then, in Okta Workflows, import the file and turn on the flow:
-
In the Okta Workflows console, open the folder to keep the export flow in, and select Actions → Import. The Import to folder dialog opens. Add the export flow file you downloaded from Eon.
-
Okta asks you to replace each folder the export flow backs up. For each one, select Replace Folder, choose a top-level folder to back up, and select Choose. Then select OK.
-
Open the imported flow, Eon Backup - Export. On its API Endpoint card, open Endpoint settings, select Secure with OAuth 2.0, and allow the Eon backup app.
-
Turn the flow on. Then copy the Invoke URL from the API Endpoint card’s Endpoint settings.
Back in the wizard:
-
In Export flow invoke URL, paste the invoke URL.
-
Select Review.
Connect the org
-
Check the Connection details: Organization URL, Client ID, Key ID, and Okta Workflows backup.
-
Select Connect. Eon checks that the app has the read scopes, can read the org, and has an admin role that can read it. The wizard shows Okta connected successfully., or Okta connected with Okta Workflows backup. when you set up Okta Workflows. If it shows Okta connected, but the Okta Workflows export flow wasn’t saved, the org is connected without Okta Workflows backup, as Troubleshooting describes.
Eon adds the org to the SaaS applications page. To start backing up the org, assign it to an Okta backup policy. To back up Okta Workflows later, see Back Up Okta Workflows. To disconnect the org later, see Manage Source Accounts.
Manual procedure
Use this procedure to create the Okta app in the Okta Admin Console instead of using the Bash script or Terraform. In the Create the Okta app step of the connection procedure, follow these steps in place of the Bash and Terraform options, then continue in the wizard with the Enter the Client ID step.
Create the API Services app
-
Sign in to the Okta Admin Console as a Super Administrator.
-
Go to Applications → Applications and select Create App Integration.
-
Choose API Services and select Next.
-
Name the app, such as
Eon Backup, and select Save.
Add the public key
-
On the app’s General tab, select Edit under Client Credentials.
-
Set Client authentication to Public key / Private key, and keep Save keys in Okta.
-
Select Add key, paste the public key (JWK) from the wizard, and select Done.
-
Select Save.
Grant the read scopes
On the Okta API Scopes tab, select Grant next to each of these scopes:
To back up Okta Workflows, also grant okta.workflows.invoke.manage.
The connection check doesn’t require it.
Assign the Read-only Administrator role
On the Admin roles tab, select Edit assignments, choose Read-only Administrator, and select Save Changes.
Grant read access to admin assignments
The okta.roles.read scope doesn’t replace this admin permission.
-
Go to Security → Administrators → Roles, and create the role Eon Backup - View admin assignments with the permission View roles, resources, and admin assignments.
-
Under Resources, create a resource set that contains All Identity and Access Management resources, such as
Eon Backup - All IAM resources. -
On the app’s Admin roles tab, assign the custom role with that resource set, in addition to Read-only Administrator.
Troubleshooting
When a connection fails, the wizard shows one of these messages in a dialog.
Okta connected, but the Okta Workflows export flow wasn't saved
The issue
The wizard shows the message Okta connected, but the Okta Workflows export flow wasn't saved (<error>). Add it from the Okta account's menu under Edit setup.
The org is connected, but Eon backs up the rest of the org without Okta Workflows.
The fix
In the row of the org, select (Actions) and then Edit setup, and add the export flow as Back Up Okta Workflows describes.
The Okta app is missing Okta API scopes
The issue
The wizard 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, select Grant next to each scope that the message lists. Then select Connect again.
Okta refused the requested scopes
The issue
The wizard shows the message Okta refused the requested scopes; grant the Okta app the Okta API scopes <full list> and connect again.
The fix
On the app’s Okta API Scopes tab in Okta, grant every scope that the message lists. Then select Connect again.
The Okta app has no admin role that can read the organization
The issue
The wizard shows the message The Okta app has no admin role that can read the organization; assign it the Read-only Administrator role on the app's Admin roles tab and connect again.
The fix
On the app’s Admin roles tab in Okta, assign the Read-only Administrator role. Then select Connect again.
Invalid Okta credentials or organization URL
The issue
The wizard shows the message Invalid Okta credentials or organization URL.
The fix
Check the Client ID, the public key you added to Okta, and the Organization URL. Then select Connect again.
Failed to validate the Okta organization
The issue
The wizard shows the message Failed to validate the Okta organization; check the signing key and try again.
The fix
Check that the public key in Okta is the key the wizard shows. Then select Connect again.
Okta API returned an HTTP error
The issue
The wizard shows the message Okta API returned HTTP <code>.
Okta throttled the request or returned a server error.
The fix
Select Connect again.
The Okta org is already connected
The issue
The wizard shows the message The Okta org <url> is already connected as "<account name>". Disconnect that account first, or reconnect it from its settings.
The org is already a source org in Eon.
The fix
In the row of the org, select (Actions) and then Disconnect, or Reconnect if its status is Not Connected or Error.
Okta signing key was not found
The issue
The wizard shows the message Okta signing key was not found.
The fix
Generate the signing key again, and add the new public key to the Okta app. Then select Connect again.