Repository navigation
v1.1.6 (2026-12-02)
Changes since v1.1.5.
Changed
- High impact — AASQL and ABAC temporal operators follow XSD and XPath semantics and no longer depend on the PostgreSQL session TimeZone. $dateTimeCast and $timeCast accept only xs:dateTime and xs:time values, so dates, timestamps without "T" or seconds, and other formats such as "today" no longer match, and xs:date Properties are no longer cast to midnight. UTC is the implicit timezone of values without one. Times compare as instants, so "10:00:00+02:00" equals "08:00:00Z" instead of "10:00:00Z", and "24:00:00" equals "00:00:00"; casting an xs:dateTime to xs:time keeps its clock time and timezone. Fractional seconds beyond microseconds are truncated instead of rounded, $strCast of a date-time or time returns its XPath canonical text and keeps its timezone, for example "2024-01-01T00:30:00.5+02:00", and descriptor createdAt fields read as canonical xs:dateTime text in UTC with "Z". $sme#valueType returns the declared valueType of every Property, for example xs:int instead of xs:double and xs:boolean for a Property without a value. Fields compared with a date-time, time, number, boolean, or hex operand are always cast to that type, also when implicit casts are disabled, instead of failing in PostgreSQL, $numCast of a date-time, a time, or any other value that is not a number yields no match instead of comparing the original value, $hexCast of a date-time or time yields no match, and $hexCast of a field trims and upper-cases the value like a literal cast and yields no match unless it has the form 16#. Values with a negative or zero year are stored and returned unchanged but never match temporal casts. (#917)
- Security: Access rules with temporal conditions can decide differently and must be reviewed. Rules comparing $timeCast of LOCALNOW or CLIENTNOW with a clock time in another offset, for example "08:00:00Z", now compare instants and need the local offset, such as "08:00:00+01:00". Casting a date or other non-xs:dateTime text with $dateTimeCast yields an indeterminate comparison. $not in ABAC policy rules preserves an indeterminate comparison, so a failed $dateTimeCast, $timeCast, $numCast, $boolCast, or $hexCast (including implicit casts), a failed date part, a $regex that is evaluated against a stored value and whose pattern PostgreSQL rejects, whether the pattern comes from a literal, a claim, or a field, or a $match term whose claim or attribute comparison cannot be evaluated makes a negated rule deny instead of allow, including for correlated Submodel Element conditions. In caller queries, $not over such a condition on a correlated field, such as a Submodel Element value, still includes the candidate. Rules checking $sme#valueType against the previously inferred xs:double or xs:string types can match a different set of elements. A cast of a missing value and a $regex over a missing value or pattern also count as indeterminate, so negated rules over them deny. Rules that compare hex values match stored values that differ only in letter case or surrounding whitespace, such as " 16#0a". With the default implicit casts, temporal decisions are independent of the configured postgres.timezone.
Fixed
-
High impact — Preserve the submitted xs:time, xs:date, and xs:dateTime values for Submodel Element Properties and Range bounds, including offsets, omitted timezones, and fractional precision. Schema v1.2.4 backfills values from the legacy typed columns into the text columns, then removes the nine legacy Property and Range columns in the same transaction. Legacy xs:dateTime values are rendered in UTC with a "+00:00" offset, and infinite values keep the text "infinity" or "-infinity". The migration preserves existing text and stops if stored representations conflict. Offsets or sub-microsecond precision that PostgreSQL already discarded cannot be restored. The first full replacement that resubmits such a value in another form, for example with "Z" instead of "+00:00", stores the new text and counts as a change. The upgrade is not compatible with rolling updates. Stop all BaSyx services sharing the database, in Kubernetes by scaling them to zero, take a restorable backup, and run the Configuration Service before starting the upgraded services. The patch holds exclusive locks on the Property and Range tables for the whole backfill, so rehearse on a copy to size the maintenance window, and views that depend on the dropped columns stop it. Rollback after a successful schema upgrade requires restoring the backup. (#917)
- Security: ABAC and AASQL string predicates on a temporal Property value see the submitted text for elements written or updated by this version and the returned UTC text for older rows. Policies that match the PostgreSQL text format of earlier versions, such as "2024-01-01 08:00:00+00", need to use these representations. Deployments whose PostgreSQL session TimeZone was not UTC previously returned legacy xs:dateTime values with that offset and now return them in UTC.
-
Low impact — Replacing a Range Submodel Element with PUT and only one of min or max no longer aborts the connection; the omitted bound is cleared. A PATCH that omits min or max and keeps the valueType keeps the stored bound instead of writing back the value read before the update, and returns HTTP 409 when another request changed the Range valueType while the omitted bound has a stored value. A PATCH that changes the valueType re-encodes the bounds read before the update. (#917)
- Security: None.
-
Medium impact — AASQL and ABAC conditions that apply $year, $month, $dayOfMonth, or $dayOfWeek to the $dateTimeCast of a field are evaluated against the stored values instead of never matching. Date parts of fields and of literals both use the value's own timezone, as XSD defines them, so $year of "2024-01-01T00:30:00+02:00" is 2024 in either position. (#917)
- Security: Access rules that apply a date part to a field previously never matched and could only deny access. They now match stored values and can grant access, so review such rules before upgrading.
-
Low impact — AASQL and ABAC conditions whose temporal operands are all literals or claims are decided like the same comparison in the database. Time comparisons keep fractional seconds, and inputs that PostgreSQL rejects, such as comma-separated fractions or offsets beyond 14 hours, no longer match. Casts of number and boolean literals, such as $strCast of a negative number, no longer fail in PostgreSQL with prepared statements, and a failed $numCast yields no value instead of comparing the original value. (#917)
- Security: Access rules that compare literal or claim times differing only in fractional seconds, or that use the affected input forms, previously could grant or deny access differently from the equivalent condition on a stored field. Review rules that relied on whole-second time comparisons.
-
Low impact — $dateTimeVal and $timeVal accept every literal form of the query-language grammar, including times without seconds such as "08:00", times and date-times without a timezone, and date-times without the "T" separator or seconds. Literals with invalid components, such as "25:00" or a 15-hour offset, are rejected with HTTP 400. $dateTimeVal literals whose instant lies before year 1, such as "0000-01-01T00:00:00Z", are compared correctly instead of causing a server error in access rules. (#917)
- Security: Access rule files and queries that use these literal forms are now accepted instead of rejected. Rules with zone-less literals use UTC as the implicit timezone.
-
Low impact — $strCast of a number yields the XPath string of an xs:double, the same when the number is a literal or a stored value. Values from 0.000001 up to 1000000 keep decimal notation, such as "100" or "0.5"; other values use scientific notation, such as "1.0E6" instead of "1e+06" or "1000000". The shortest digits that identify the value are used, independent of the database session setting extra_float_digits. (#920)
- Security: Access rules that compare $strCast of a number with a string literal match the XPath form only; rules written for the former form, such as "1000000", need to be updated.
-
Low impact — Queries and access rules no longer fail with a database error when $aasdesc#createdAt or $smdesc#createdAt is compared with a string literal or used with $contains, $starts-with, $ends-with, or $regex. These fields read as their canonical xs:dateTime text in UTC with "Z", such as "2024-01-01T08:00:00Z", independent of the database session TimeZone. $contains, $starts-with, and $ends-with compare that text literally, so "%" and "_" match only themselves. (#920)
- Security: Access rules with these conditions are evaluated instead of failing the request, so rules that matched nothing because of the error can now grant access.
-
Low impact — Updating a BasicEventElement with PUT or PATCH accepts "state" "on" and "direction" "input" instead of rejecting them with HTTP 400 "Missing Field". Requests that omit "state" or "direction" are still rejected with HTTP 400. (#932)
- Security: None.
-
Low impact — $numCast of a Boolean yields 1 or 0, and $boolCast of a number yields false for zero and NaN and true otherwise, as XPath fn:number and fn:boolean define. Previously both casts yielded no value, so conditions such as $numCast of true equal to 1 never matched. (#920)
- Security: Access rules that cast a Boolean to a number or a number to a Boolean can now match and grant access where they previously matched nothing.
-
High impact — Query conditions and ABAC formulas evaluate a $not inside an $or as the negation of the whole operand. Previously, when all operands of an $or read fields of the same related table, such as $sme#idShort, a $not operand matched if any related row did not match it; for example, a Submodel with the elements "Restricted" and "Other" matched {"$or":[{"$not":{"$eq":[{"$field":"$sme#idShort"},{"$strVal":"Restricted"}]}}, ...]}. (#945)
- Security: ABAC rules whose formula contains a $not inside an $or over fields of related tables no longer allow resources that the formula rejects. Review access granted by such rules in earlier versions.
-
High impact — Query conditions on fields of a Submodel or SubmodelElement that the caller reads through another resource, such as $sm#... and $sme#... in /query/shells or $sme#... in /query/submodels, apply the ABAC formula of that Submodel once per Submodel. Previously the formula was checked against each joined row, so a formula with $not, such as {"$not":{"$eq":[{"$field":"$sme#idShort"},{"$strVal":"Restricted"}]}}, let a condition match a Submodel that the formula hides when another element of that Submodel did not match. Formulas of grant alternatives of the queried resource are evaluated per resource in the same way. Formulas of other related resources, such as AAS descriptors, are still checked against the joined row; a $not in such a formula over a list field or a field of another resource now hides the operand. (#945)
- Security: Query conditions can no longer test values of Submodels, SubmodelElements, and other related resources that an ABAC formula with $not hides from the caller. Formulas without $not were already applied at least as strictly as the policy.
-
High impact — $contains, $starts-with, and $ends-with compare their operands literally in query conditions and ABAC formulas. Previously, % and _ in the second operand matched any string or any single character, so {"$starts-with":[{"$field":"$sm#id"},{"$strVal":"urn:example:tenant_a:"}]} also matched "urn:example:tenantXa:...". (#945)
- Security: ABAC rules that use these operators with a literal, claim, or attribute value containing % or _ no longer allow resources that do not contain, start with, or end with that value. Review access granted by such rules in earlier versions.
-
Medium impact — $numCast and $boolCast, including the implicit casts of fields compared with numbers and Booleans, accept only the XPath lexical forms. Numbers accept decimal and scientific notation, INF, +INF, -INF, and NaN after trimming XSD whitespace, and round to the nearest double, so "1e-400" is 0; PostgreSQL spellings such as "inf", "Infinity", or "0x10" yield no value. Booleans accept only "true", "false", "1", and "0"; spellings such as "t", "yes", or "on" yield no value. NaN is neither equal to, less than, nor greater than any number. (#947)
- Security: Access rules evaluated in the database matched stored values that XPath rejects or orders differently. A stored "NaN" satisfied every $gt and $ge comparison with a number, and stored values such as "t" or "yes" satisfied Boolean conditions. Such rules now match only values the query language accepts.
-
Medium impact — $gt, $ge, $lt, and $le order strings by Unicode code point, the XPath default collation, instead of the database collation. Hex values are non-negative integers in base 16 in Go and SQL; 16#0A equals 16#A, and ordering compares the numbers. (#947)
- Security: Access rules with ordering comparisons matched stored values that the query language orders differently, for example "a" before "M" under an en_US collation or "16#9" after "16#10" as text. Such rules now match the same values in the database as when they are evaluated in Go.
-
Medium impact — Simplifying query conditions and ABAC formulas with nested casts, such as $strCast of $numCast of $strCast, takes time linear in the nesting depth. Previously each cast resolved its operand twice, so the time doubled with every nesting level. (#946)
- Security: Query requests and ABAC formulas with deeply nested casts no longer consume CPU time that doubles with every nesting level.