SigNoz/signoz · error · errors SigNozError

CodeInvalidInput

CodeInvalidInput

Error message

entityId is required

What it means

Thrown by SamlConfig.validate (invoked from UnmarshalJSON) when entityID is empty. The entityID uniquely identifies the SigNoz service provider to the IdP and is required for SAML metadata and assertion validation.

Source

Thrown at pkg/types/authtypes/saml.go:48

	var temp Alias
	if err := json.Unmarshal(data, &temp); err != nil {
		return err
	}

	samlConfig := SamlConfig(temp)
	if err := samlConfig.validate(); err != nil {
		return err
	}

	*config = samlConfig
	return nil
}

// validate also assigns the default attribute mapping when none is present.
func (config *SamlConfig) validate() error {
	if config.EntityID == "" {
		return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "entityId is required")
	}

	if config.Location == "" {
		return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "location is required")
	}

	if config.Certificate == "" {
		return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "certificate is required")
	}

	if config.AttributeMapping == (AttributeMapping{}) {
		if err := json.Unmarshal([]byte("{}"), &config.AttributeMapping); err != nil {
			return err
		}
	}

	return nil
}

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Set entityId, typically your SigNoz SAML audience/SP identifier (e.g. signoz-saml or your metadata URL)
  2. Match the value configured as audience URI / entity ID in the IdP's app settings

Example fix

// before
{"location": "https://signoz.acme.com/api/v1/saml/acs", "certificate": "..."}
// after
{"entityId": "https://signoz.acme.com/api/v1/saml/metadata", "location": "https://signoz.acme.com/api/v1/saml/acs", "certificate": "..."}
Defensive patterns

Strategy: validation

Validate before calling

if cfg.EntityID == "" { return errors.New("entityId is required") }

Prevention

When it happens

Trigger: POST/PUT a SAML SSO config without "entityId".

Common situations: Copying ACS URL and certificate from the IdP but skipping the SP entityID, or misreading the IdP's metadata.

Related errors


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