mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-22 12:58:46 +00:00
chore: Service Account Naming Consistency (#11557)
# Which Problems Are Solved Inconsistent naming of service account, found in the following variations: - Machine User - machine user - Service User - Machine Account - Technical Account - User: Type Machine # How the Problems Are Solved Attentive search and replace. Localizations have been translated using Copilot # Additional Changes Some unused methods have been removed from the Go code. # Additional Context - Closes #11285
This commit is contained in:
@@ -15,7 +15,7 @@ export function hasSystemUserCredentials(): boolean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if service user token is available for authentication.
|
||||
* Checks if service account token is available for authentication.
|
||||
*
|
||||
* @returns true if ZITADEL_SERVICE_USER_TOKEN is present, false otherwise
|
||||
*/
|
||||
|
||||
@@ -23,11 +23,11 @@ export async function createServiceForHost<T extends ServiceClass>(service: T, s
|
||||
let token;
|
||||
|
||||
// Determine authentication method based on available credentials
|
||||
// Prefer system user JWT if available, fallback to service user token
|
||||
// Prefer system user JWT if available, fallback to service account token
|
||||
if (hasSystemUserCredentials()) {
|
||||
token = await systemAPIToken();
|
||||
} else if (hasServiceUserToken()) {
|
||||
// Use service user token authentication (self-hosted)
|
||||
// Use service account token authentication (self-hosted)
|
||||
token = process.env.ZITADEL_SERVICE_USER_TOKEN;
|
||||
} else {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user