rancher/rancher · error

missing attribute name after schema URN prefix

Error message

missing attribute name after schema URN prefix

What it means

Error "missing attribute name after schema URN prefix" thrown in rancher/rancher.

Source

Thrown at pkg/auth/providers/scim/filter.go:272

var knownResourceSchemaURNs = map[string]string{
	userSchemaID:  userResource,
	groupSchemaID: groupResource,
}

// stripSchemaURN removes a recognized schema URN prefix from an attribute path
// per RFC 7644 section 3.10. If path has no URN prefix, it is returned unchanged.
// If expectedResourceType is non-empty, the URN's resource type must match it.
func stripSchemaURN(path, expectedResourceType string) (string, string, error) {
	if !strings.HasPrefix(path, "urn:") {
		return path, "", nil
	}

	for urn, resourceType := range knownResourceSchemaURNs {
		prefix := urn + ":"
		if strings.HasPrefix(path, prefix) {
			attrPath := path[len(prefix):]
			if attrPath == "" {
				return "", "", fmt.Errorf("missing attribute name after schema URN prefix")
			}
			if expectedResourceType != "" && !strings.EqualFold(resourceType, expectedResourceType) {
				return "", "", fmt.Errorf("schema URN %q does not match resource type %q", urn, expectedResourceType)
			}
			return attrPath, resourceType, nil
		}
	}

	return "", "", fmt.Errorf("unrecognized schema URN prefix in attribute path %q", path)
}

// isValidAttributeName checks if the attribute name is valid per SCIM spec.
// Valid names contain letters, digits, underscores, and dots (for nested attributes).
// Must start with a letter or underscore.
func isValidAttributeName(name string) bool {
	if name == "" {
		return false
	}

View on GitHub (pinned to 932558d4e6)

When it happens

Trigger: Thrown at pkg/auth/providers/scim/filter.go:272 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rancher/rancher@932558d4e6 (2026-08-16). Data as JSON: /api/errors/c57f49b26883064e. Report an issue: GitHub.