Authorities conditions grant when a referenced value is missing (neq, and any condition under not) in @frontmcp/auth
Description
An authorities condition can compare against a value taken from the request ({ fromInput }) or from the caller's token ({ fromClaims }). When that value is missing, the condition should never let the caller through. It does in two ways:
neqon its own.applyOperatorreturnsactual !== expected, and nothing is equal toundefined, so a "not equal" condition passes when the compared value is missing.- Any condition under
not. A condition with a missing value evaluates to an ordinaryfalse, andnotturns that into a grant. This applies toeq,in,notIn,gt/gte/lt/lte,contains,startsWith/endsWith/matches,attributes.match, and relationship checks whoseresourceIdcomes from a reference, wherever thenotsits (including insideanyOf,operator: 'OR'or a named profile).
A caller who leaves the referenced input field out, or whose token lacks the claim, passes a rule written to refuse them.
Details
All references are to v1.11.2.
authorities.evaluator.ts:132:case 'neq': return actual !== expected;. Theeqcase above it returnsexpected !== undefined && actual === expected, soeqfails on a missing value, andnotaround it grants.authorities.engine.ts:353:evaluateNotreturnsgranted: !result.granted, with no distinction between "the condition is false" and "the condition could not be checked".- Entry authorities run before input validation, so an optional input field is enough. Leaving out a required field still ends in a validation error.
Examples that grant when the referenced value is missing:
{ path: 'claims.org', op: 'neq', value: { fromInput: 'org' } }{ not: { path: 'claims.org', op: 'eq', value: { fromInput: 'org' } } }{ not: { path: 'claims.org', op: 'in', value: { fromClaims: 'blocked_orgs' } } }{ not: { relationships: { type: 'blocked', resource: 'project', resourceId: { fromInput: 'projectId' } } } }
Impact
A tool, resource or prompt guarded by such a rule runs for a caller the rule meant to refuse. The effect depends on what the rule guards, and is higher for destructive actions.
Patches
Fixed in @frontmcp/auth 1.11.3. The fix treats a condition whose referenced value is missing as unresolved: not, allOf, anyOf and operator carry that state through, and it always denies.
Workarounds
Make the input fields that conditions read required in the entry's input schema, and add conditions that require referenced claims to be present. Avoid not around conditions that use fromInput or fromClaims.