Skip to content

Understand service accounts

User accounts and service accounts have different purposes in STACKIT. While both are used to authenticate and authorise actions, a user account is designed for a human user, and a service account is for system services and applications.

Key characteristics and functions of service accounts

Section titled “Key characteristics and functions of service accounts”

A service account lets you grant specific permissions to a service or application without exposing personal credentials. This makes automated workflows more secure and easier to manage. You can create a service account and assign roles and permissions within a STACKIT project in the STACKIT Portal.

  • Non-human identity: A service account is not associated with a person.
  • Automation: Ideal for automating routine tasks, managing resources, and integrating with different APIs.
  • Authentication: Provides a unique identity for an application to be authenticated.
  • Authorisation: Configure access controls and permissions so only authorised applications can access specific resources.
  • Security: Using service accounts for automated tasks enhances security by avoiding personal user accounts, which may be less secure.
  • Role-based access control (RBAC): Like user accounts, service accounts have no access to resources by default. Grant permissions by assigning roles to the service account for specific resources.
  • Workload Identity Federation (WIF): WIF let you link a service account to an external OIDC issuer. This mechanism acquires short-lived tokens without static keys.

Authenticate a service account with a traditional key or through federation.

You can configure a Federated Identity Provider to trust tokens issued by an external OIDC issuer. This process links a service account to an external OIDC issuer to acquire short-lived tokens without static keys. When creating a Federated Identity Provider, explicitly define who you trust from the external OIDC issuer.

Define two main elements: the issuer URL and a set of assertions. Tokens from the external issuer are accepted only when the issuer URL matches the exact iss value in the tokens and all assertion conditions are met. Assertions define required behaviour or claims within the external token, specifying an item (for example, subject or audience), an operator (currently equality), and a value. For example, assertions might require the subject to EQUALS shop-api AND the audience to EQUALS clients.

Alternatively, a service account key is a credential you use to authenticate with STACKIT using the key flow. When you create a key for your service account in the STACKIT Portal, the system can generate an RSA key pair for you, or you can provide your own.

Service account roles and permissions matrix

Section titled “Service account roles and permissions matrix”