protected function filterProperties(array $properties) {
        $tags = array_fill_keys($this->allowedTags, 1);

        if (empty($tags) || isset($tags['*'])) {
            return $properties;
        }

        $filtered = [];

        foreach ($properties as $key => $value) {
            if (isset($tags[$key])) {
                $filtered[$key] = $value;
                continue;
            }

            if (($pos = strpos($key, ':')) !== false) {
                $namespace = substr($key, 0, $pos);

                if (isset($tags[$namespace . ':*'])) {
                    $filtered[$key] = $value;
                    continue;
                }
            }
        }

        return $filtered;
    }