SigNoz/signoz · error

invalid_input

invalid_input

Error message

identn::impersonation cannot be enabled if identn::tokenizer is enabled

What it means

The identn (identity) Config.Validate rejects enabling impersonation while the tokenizer is also enabled, because the two mechanisms are mutually exclusive ways of resolving request identity.

Source

Thrown at pkg/identn/config.go:63

	return &Config{
		Tokenizer: TokenizerConfig{
			Enabled: true,
			Headers: []string{"Authorization", "Sec-WebSocket-Protocol"},
		},
		APIKeyConfig: APIKeyConfig{
			Enabled: true,
			Headers: []string{"SIGNOZ-API-KEY"},
		},
		Impersonation: ImpersonationConfig{
			Enabled: false,
		},
	}
}

func (c Config) Validate() error {
	if c.Impersonation.Enabled {
		if c.Tokenizer.Enabled {
			return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "identn::impersonation cannot be enabled if identn::tokenizer is enabled")
		}

		if c.APIKeyConfig.Enabled {
			return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "identn::impersonation cannot be enabled if identn::apikey is enabled")
		}
	}

	return nil
}

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Disable identn.tokenizer if you need impersonation
  2. Or disable impersonation if tokenizer is required
  3. Re-run config validation locally (Config.Validate) before deploying

Example fix

# before
impersonation:
  enabled: true
tokenizer:
  enabled: true
# after
impersonation:
  enabled: true
tokenizer:
  enabled: false
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Impersonation.Enabled && cfg.Tokenizer.Enabled { return cfg.Validate() /* surfaces error early */ }
return cfg.Validate()

Try / catch

if err := cfg.Validate(); err != nil { log.Fatal(err) }

Prevention

When it happens

Trigger: Setting impersonation.enabled=true and tokenizer.enabled=true in the identn config at startup.

Common situations: Copy-pasted config blocks enabling every feature; migrating from tokenizer to impersonation without disabling the old one.

Related errors


AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28). Data as JSON: /api/errors/23d2064614ad3804. Report an issue: GitHub.