# License IDs and service account tokens

This topic describes the license ID and Enterprise Portal service account tokens, the two credentials that customers authenticate with. It also describes how to help a customer replace a token.

## Overview

Every installation authenticates with a credential to download releases, pull images through the Replicated proxy registry, and sync license changes. That credential is either the customer's license ID or a service account token that the customer creates in the [Enterprise Portal](/vendor/enterprise-portal-v2-about).

Both credentials can install your application, download releases, pull images, and sync the license. The difference is who controls them and what can be done if one is shared or exposed. Treat both like passwords. The customer ID isn't sensitive, but a license ID or a service account token is enough to download your releases and pull your images.

## License IDs

The license ID is created with the customer and never changes. It can't be rotated or revoked on its own. The only way to stop a license ID from working is to expire the license, which also stops every service account token for that customer. For what happens when a license expires, see [Default license expiration handling](/vendor/licenses-about#expiration) in _About customers and licensing_.

Customers who use the Download Portal log in with a Download Portal password that you generate or set for the customer, which everyone at that customer shares, and they install with the license ID. To give a customer a credential that they can replace, give them access to the Enterprise Portal. For more information, see [Give customers access to the new Enterprise Portal](/vendor/enterprise-portal-v2-invite#give-customers-access) in _Manage customer access_.

## Service account tokens

The Enterprise Portal calls these credentials service accounts. It can help to think of them as install tokens. They're separate from the service accounts that your team uses to call the Vendor API, which are described in [Generate API tokens](/vendor/replicated-api-tokens).

Users on the customer's team create service accounts and tokens in the Enterprise Portal, so the customer controls them without asking you. For more information, see [Manage service account tokens](/vendor/enterprise-portal-v2-use#rotate-or-revoke-a-service-account-token) in _Log in to and use the Enterprise Portal_. The portal also creates a service account when a customer starts an installation from the portal, and you can create one for a customer when you create install options through the Vendor API. For more information, see [Service accounts](/vendor/enterprise-portal-v2-invite#service-accounts) in _Manage customer access_ and [Create install options](/vendor/enterprise-portal-v2-vendor-api-automation#create-install-options) in _Headless Enterprise Portal: Vendor API_.

Customers also use service account tokens for automation, such as CI/CD pipelines that fetch install instructions and artifacts from the Enterprise Portal API. For more information, see [Headless Enterprise Portal: customer API](/vendor/enterprise-portal-v2-service-account-automation).

A service account token works in place of the license ID to install, download releases, pull images, and sync the license. When a customer downloads a license file from the Enterprise Portal with a service account selected, the license file carries the token in place of the license ID, so installations started from that file authenticate with the token. Tokens don't expire. Each token works until it's revoked or the customer's license expires.

Recommend that customers install with a service account token instead of the license ID. The license ID then never needs to leave your team, and the customer can replace an exposed token themselves. To move an existing installation from the license ID to a token, reinstall it with the token.

## What vendors can do with service accounts

The Vendor Portal shows each customer's service accounts and the instances that use them on the customer's **Enterprise Portal access** tab, but it doesn't revoke them. For more information, see [Service accounts](/vendor/enterprise-portal-v2-invite#service-accounts) in _Manage customer access_. You can revoke a whole service account with the Vendor API, which stops all of its tokens. **Login as customer** opens a customer admin session, which can create and revoke tokens as the customer would. For more information, see [Manage service accounts](/vendor/enterprise-portal-v2-vendor-api-automation#manage-service-accounts) in _Headless Enterprise Portal: Vendor API_ and [Login as customer](/vendor/enterprise-portal-v2-access#login-as-customer) in _Test and preview the Enterprise Portal_.

## Help a customer replace a token

How a customer replaces a token depends on which Enterprise Portal they use.

In the new Enterprise Portal, the customer creates a new token on the same service account, moves each installation and automation to it, confirms that each one checks in, and then revokes the old token. The old token keeps working until it's revoked, so the move doesn't interrupt the installation. For the steps for each installation method, see [Replace a token](/vendor/enterprise-portal-v2-use#replace-a-token) in _Log in to and use the Enterprise Portal_.

In the Classic Enterprise Portal, rotating a token invalidates the current token immediately, so installations that use it stop syncing their license and receiving updates until they're moved to the new token. To rotate, the customer selects **Rotate token**. Ask them to move each installation as soon as they rotate. For more information, see [Manage service accounts](/vendor/enterprise-portal-use#manage-service-accounts) in _Log in to and use the Classic Enterprise Portal_.

In both portals, Embedded Cluster v3 installations can't move to a new token. Running air gap installations don't use the token after installation, so a customer can rotate or revoke a token without affecting them and use the new token for the next download.

If a token is shared outside the customer's team, the customer replaces it the same way. They revoke the exposed token as soon as their installations have moved, or immediately if only air gap installations use it. For more information, see [If a token is exposed](/vendor/enterprise-portal-v2-use#if-a-token-is-exposed) in _Log in to and use the Enterprise Portal_. If a license ID is exposed, expire the license as described in [License IDs](#license-ids). To give the customer a new license ID, create a new customer and have them reinstall.