Programmatic Access Using Service Accounts
Introductionโ
A Service Account can authenticate access to Tecton using either API key credentials or OAuth client credentials.
About API Key Credentialsโ
An API key Service Account has a single API key. This key is long-lived and
cannot be rotated. Requests to Tecton with API keys are authenticated using the
Tecton-key scheme in the Authorization header of the request.
About OAuth Client Credentialsโ
This feature is currently in Public Preview.
Please review the Limitations associated with this Public Preview feature.
Service Accounts can use short-lived access tokens by leveraging OAuth credentials. They authenticate to Tecton using the OAuth 2.0 client credentials grant type to get a short-lived access token which they can use to call Tecton APIs (e.g call Feature Services). These clients are designed to meet more strict security requirements and support client secret rotation. This authentication method offers enhanced security compared to long-lived API keys through:
- Automatic token expiration after 1 hour
- Programmatic client secret rotation
Create and Manage Service Accountsโ
A Service Account can have either an API Key or OAuth client credentials (but not both).
Create a Service Accountโ
Use the HTTP API or CLI to create Service Accounts. Service Accounts with an API Key can also be created via the Web UI.
For example, to create an OAuth Service Account using the CLI:
tecton service-account create --oauth -n "<service-account-name>"
The output should resemble:
Save this Client Secret - you will not be able to get it again.
Client Secret: <SAVE THIS SECRET VALUE>
Make sure to save the new Service Account's API key or client secret somewhere secure immediately after creation, because you will not be able to retrieve it later.