Service Accounts

A service account is a non-human identity that applications use to authenticate to the Tenable One Cloud Exposure API. Each service account has a unique ID, one or more assigned roles, and its own secrets.

A secret is the credential an application sends to the API. In earlier releases this credential was called a token. Each service account holds up to two active secrets at a time, which lets you rotate credentials without interrupting a running application.

You manage service accounts on the Service Accounts page, under Settings > Access Management. To start calling the API with a secret, see Get Started with the API.

Note: Creating and managing service accounts requires the Settings permission.

A service account operates within an account scope. Set the scope from the scope selector at the top of the Console, the same as elsewhere in the Console. By default, the entire organization is selected.

Secondary Secret Rotation

Two secret slots let you replace a credential with no downtime. If a service account allowed only one secret, you would have to delete the active secret before creating a new one, and the connected application could not authenticate during the switchover.

To rotate a secret without downtime:

  1. The application authenticates with Secret A.
  2. You create Secret B. The service account now has two active secrets.
  3. You update the application code or environment variables to use Secret B.
  4. After you confirm the application works with Secret B, you delete Secret A.

A service account can hold zero, one, or two secrets. A service account with no secrets remains valid, but no application can authenticate with it until you create a secret.

View Service Accounts

The Service Accounts page lists every service account in the selected scope.

To view service accounts:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. (Optional) Expand a row to view the assigned scope for that service account.

The table includes the following columns.

Column Description
Name The name of the service account.
Description An optional description of the service account.
Scope The scope the service account operates in.
Usage Time The timestamp at which any of the service account secrets was last used.
Modification Time The date the service account was last modified.
Modified By The user who modified the service account.

The Creation Time and Created By columns are hidden by default.

Each service account row includes an actions menu with the following options: Add Role Assignment, Manage Secrets, Edit, and Delete.

Create a Service Account

Cloud Exposure creates the service account in the scope currently selected in the scope selector at the top of the Console.

To create a service account:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. Click Create.

    The Create New Service Account window appears.

  3. In the Name box, type a meaningful name for the service account.
  4. (Optional) In the Description box, type a description.
  5. (Optional) In the Role drop-down box, select a role. You can add a role later. For more information, see Add a Role Assignment.
  6. Click Create.

    The Create New Secret window displays the first secret for the service account.

  7. Copy the secret to a secure location.
  8. Click Close.
Caution: The secret appears only once, at creation. After you close the window, you cannot view the secret again. If you lose it, delete the secret and create a new one.

Create a Secret

Create a second secret to rotate credentials, or create a secret for a service account that has none. You create a secret in the Manage Secrets window.

To create a secret:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. In the table, locate the service account.
  3. Click the actions menu for the service account, and then click Manage Secrets.

    The Manage Secrets window appears.

  4. Click Create Secret.

    The new secret appears once.

  5. Copy the secret to a secure location.
Note: A service account holds a maximum of two active secrets. To create a secret when the service account already has two, first delete one of the existing secrets.

Enable or Disable a Secret

Disable a secret to stop it from authenticating without deleting it. A disabled secret cannot authenticate, so anything that uses it stops working until you enable it again. The other secret of the service account is not affected.

To enable or disable a secret:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. In the table, locate the service account.
  3. Click the actions menu for the service account, and then click Manage Secrets.

    The Manage Secrets window appears.

  4. In the Status column, click the toggle for the secret.

    The status changes to Enabled or Disabled.

Delete a Secret

Delete a secret from the Manage Secrets window, after you confirm that no application depends on it.

To delete a secret:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. In the table, locate the service account.
  3. Click the actions menu for the service account, and then click Manage Secrets.
  4. Click the delete icon next to the secret to delete.
  5. In the Delete Secret window, confirm the deletion.
Caution: Secret deletion is permanent and cannot be undone. A deleted secret cannot be recovered, and any code currently using it stops working immediately.

Add a Role Assignment

Roles control what a service account can access. A service account can hold multiple roles, and each role applies to its own scope.

A role's scope can be the full scope selected in the scope selector at the top of the Console, or any narrower subset of it. This lets you grant one role access to a specific folder or account while another role covers the whole scope.

To add a role assignment:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. In the table, locate the service account.
  3. Click the actions menu for the service account, and then click Add Role Assignment.

    The Add Role Assignment window appears.

  4. In the Assigned Scope drop-down box, select the scope the role applies to.
  5. In the Role drop-down box, select a role.
  6. Click Save.

Edit a Service Account

Use the Edit Service Account window to update the name or description.

To edit a service account:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. In the table, locate the service account.
  3. Click the actions menu for the service account, and then click Edit.
  4. Update the Name or Description.
  5. Click Save.

Delete a Service Account

To delete a service account:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. In the table, locate the service account.
  3. Click the actions menu for the service account, and then click Delete.
  4. When prompted, confirm the deletion.
Caution: Service account deletion is permanent. Deleting a service account deletes its secrets, and any code using those secrets stops working immediately.

View Service Account Details

The service account profile is read-only. Use it to review a service account without making changes.

To view service account details:

  1. In the left navigation bar, click Settings > Access Management > Service Accounts.
  2. In the table, click the service account name.

The profile shows the following details:

  • Description, Scope, Usage Time, and Modification Time
  • Modified By, Creation Time, and Created By
  • A Role Assignments table listing each assigned role with its Scope
  • A Secrets table listing each secret with its Created By, Creation Time, Usage Time, and Status

Audit Logging

Cloud Exposure records Create and Delete actions on a service account in the system audit. Actions on the roles assigned to a service account are not recorded as service account audit events.