Repository navigation
Update OpenIG documentation to match runtime configuration - #200
Conversation
maximthomas
left a comment
There was a problem hiding this comment.
praise: The Quickstart test runs the documented configuration through a real gateway and checks that both the path and query reach the upstream.
issue (blocking): Read the logout script listings with line-ending normalization.
The new test reads raw bytes and passes them to a helper that looks for LF-delimited listing markers. Both Windows jobs fail all four logout cases at the first marker assertion, before either script runs. The base used normalized line reads for the previous callers of this helper. Normalize line endings as the existing article reader does, or make the helper accept both formats. Windows JDK 11 · Windows JDK 27 · CI excerpts
Closure criterion All four logout cases execute and pass from a CRLF checkout, and both Windows jobs pass.
issue (blocking): Preserve per-user quotas for existing subject templates.
Base evaluated trusted configuration before compiling the resulting subject expression. A JVM property containing an EL template and an escaped EL template therefore both resolved the current user's identity. HEAD compiles the original setting only and uses its resulting literal template text as the bucket key. In a local comparison with a one-request budget and a mocked upstream, base returned 200 for two distinct users and 429 for a repeat request. HEAD returned 429 for the second user because both shared the literal key. Preserve the existing configuration forms alongside direct request-time evaluation of expressions that combine heap properties with request bindings. Base and HEAD comparison · Test harness
Closure criterion Two distinct users get separate identities and quotas with both existing template forms and direct mixed heap/request expressions.
issue (blocking): Give the password-replay templates an upstream for requests they pass through.
The Quickstart moves URI rebasing from the Router to its fallback route. The Simple Login Form, Cookie Filters, Hidden Fields, and Header Filters templates still rely on an upstream for requests that match their route but leave the login filter unchanged. A Java 11 check loaded the documented Simple Login Form route and recorded the target URI at the outbound handler boundary. HEAD retained the gateway authority, which would send the request back through the same route, while restoring the base Router decoration or adding a route-level baseURI selected the application. Set the upstream on the affected templates, including the Classic OpenAM Login Form, which also performs an initial fetch through the downstream handler. Template prerequisite · Simple Login Form · Recorded targets
Closure criterion With the published Quickstart and an affected template installed, an initial fetch or matching pass-through request reaches the intended upstream, and explicit login requests still use their configured login URI.
|
@maximthomas I addressed the three findings in the follow-up commit.
The focused Maven verification passed 139 tests on each JDK. Follow-up commit |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The new gateway test loads all six documented password-replay templates and checks the outbound URI. The Simple Login Form case also checks that its generated POST preserves the login endpoint.
issue (blocking): Preserve subject templates supplied by heap properties that share a request binding's name.
Expression.java:245 · LLMProxyFilter.java:324
With "sub": "${request}" and a heap property named request that resolves to the legacy template ${attributes.sub}, the base compiles that template at startup and gives Alice and Bob separate quotas. The follow-up defers request before looking up the heap value, so the runtime HTTP Request replaces the template and the string subject falls back to anonymous. Both reviewed revisions return 429 on Bob’s first request after Alice uses the shared quota. Preserve startup resolution for these heap-provided templates and add the collision case to the existing quota tests. Three-revision comparison · Independent comparison
Closure criterion Distinct users retain independent identities and quotas with legacy templates supplied by JVM properties, escaped settings and heap properties, including a name shared with a request binding. Keep direct expressions that mix heap and request bindings working.
|
@maximthomas The follow-up preserves EL subject templates from heap properties whose names match request bindings. Startup evaluation uses the configured value when it can resolve the expression. A binding or member that is unavailable in the heap defers the original expression to request time. The quota tests cover a heap property named Maven passed 1,219 tests on JDK 11 and 67 focused tests on JDK 27. Follow-up commit |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The quota test checks Alice and Bob independently and covers both request.uri and request.getUri() with a heap property named request.
issue (blocking): Preserve legacy templates when an optional heap member is absent.
With heap request = {"defaultSubject":"${attributes.sub}"} and sub = "${empty request.override ? request.defaultSubject : request.override}", the base selects the default template and gives Alice and Bob separate quotas. HEAD defers at the missing override before EL can select the default. At request time, the HTTP Request has no defaultSubject, so both users get anonymous and Bob's first request returns 429. Preserve legacy template selection when an optional heap member is missing. Filter startup and fallback · Three-revision comparison · Independent comparison
Closure criterion Distinct users retain independent quotas for JVM, escaped and heap-provided templates, including a template selected by an optional-member fallback under a colliding name. Direct mixed expressions still evaluate with request bindings.
issue (blocking): Evaluate guarded direct subject expressions with runtime attributes.
With heap tenant = "example" and attributes = {}, the direct subject ${tenant}-${empty attributes ? 'guest' : attributes.sub} evaluated with the populated request attributes at c0854aa. HEAD lets the empty heap map satisfy the startup lookup, so the condition selects example-guest before the user attribute is read. Both users spend the same quota and Bob's first request returns 429. The PR base had the same failure, and this delta restores it after the previous round had made the direct expression work. Keep direct runtime-dependent guards deferred while accepting startup values that supply a legacy template. Runtime attributes · Three-revision comparison
Closure criterion The guarded expression yields example-alice and example-bob with the same heap settings. Alice's second request exhausts her own quota.
|
@maximthomas Both third-round cases are covered in the follow-up.
Additional tests check template selection through Maven passed 1,224 tests on JDK 11 and 72 focused tests on JDK 27. Follow-up commit |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The new quota tests check both a missing heap override and an empty heap attributes map with populated request attributes.
issue (blocking): Preserve heap templates selected by string guards.
A guard such as request.defaultSubject.startsWith('$') selects the configured template on the PR base and ca22ae4. HEAD prepends its marker to the template before reevaluating the guard, which selects another branch and makes the filter retain the original startup expression. With an HTTP Request bound at runtime, the checked example yields the fallback identity, which can pool distinct users under one quota. Preserve the selected template without changing the values that EL conditions see. Independent JDK 11 comparison
Closure criterion Legacy JVM, escaped and heap templates preserve per-request subject evaluation, including optional-member fallbacks and colliding heap properties. A string guard must produce the same selection during compatibility evaluation as it does with the original heap values. Direct request-time expressions must continue to use request bindings.
issue (blocking): Preserve startup subjects selected by heap-only expressions.
The base and ca22ae4 both resolve ${request.defaultSubject} to a configured plain string such as service-account. HEAD discards that startup result because the compatibility path requires a template read from a colliding heap property. The same rule discards a JVM-provided template selected by a heap-only condition when the colliding heap property only supplies the condition's plain string. The runtime Request has no defaultSubject, so these configurations lose their intended quota identity. Preserve startup results for heap-only selections while keeping direct reads of runtime bindings request-bound. Independent JDK 11 comparison
Closure criterion The plain heap subject and JVM template selected by a heap-only condition yield their configured identities, and direct reads still use request data.
|
@maximthomas The follow-up covers both findings from this round.
The tests also cover a JVM template selected after a missing optional member, an empty heap string named Maven passed 1,231 tests on JDK 11 and 79 focused tests on JDK 27. Follow-up commit |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The new quota tests cover string guards, configured service accounts, JVM templates selected by heap conditions, and the precedence of the live request URI.
issue (blocking): Preserve heap templates when a subject expression composes their output.
With sub = "tenant-${attributes.defaultSubject}" and a heap attributes.defaultSubject of ${attributes.sub}, the PR base and 49bba8b give Alice and Bob separate tenant-alice and tenant-bob quotas. HEAD checks the entire startup result against exact or trimmed heap reads, so it discards tenant-${attributes.sub} and evaluates the outer expression against live attributes where defaultSubject is absent. Both requests then use tenant-, and Bob's first request returns 429. Preserve the origin of the selected template through composition and trimming without changing the values evaluated by guards. The comparison also covers a JVM guard that reads text equal to the returned heap template and a trimmed whole heap request template. Base, OLD, and HEAD · Independent filter check
Closure criterion Distinct users retain independent identities and quotas for JVM, escaped and heap templates, including optional-member and string guards, composed templates, and trimmed whole bindings. Text read only by a guard leaves the runtime expression deferred.
issue (blocking): Defer direct subject guards that depend on the live request.
With an empty heap request map, ${empty request.override && empty request ? 'guest' : attributes.sub} gives Alice and Bob separate quotas at 49bba8b. HEAD counts the missing override read as configuration, so the empty heap map selects guest at startup and prevents the live request and its attributes from determining the subject. Bob's first request now returns 429, and the same failure occurs when the runtime branch reads request.uri.path. Keep guards that depend on the live request deferred while preserving genuinely heap-selected defaults. Startup acceptance · Independent filter check
Closure criterion The guarded expression yields alice and bob, and Alice's repeat request exhausts her own quota. The existing empty heap attributes guard, live URI precedence, and optional-member heap-template selection still pass.
|
@maximthomas, I addressed both findings from the fifth review. Review · Commit
The tests verify that Alice and Bob each get an independent quota and that Alice's repeat request returns |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The new whole-request guard test checks both live attributes and the live URI after an optional heap member read.
issue (blocking): Preserve heap subject templates passed through array() and join().
With sub = "${join(array(attributes.defaultSubject), '')}" and a heap attributes.defaultSubject of ${attributes.sub}, both the PR base and 4f74fb4 give Alice and Bob distinct identities and quotas. The new call tracking carries template text forward only for String returns, so array() drops the source of the template from the String[] that join() uses. HEAD evaluates the original expression against live attributes without defaultSubject and both calls use the literal identity "null", yielding 429 on Bob's first request. Carry the selected template through the intermediate array and assert separate identities and quotas. Filter comparison · Independent filter check · Existing EL composition test
Closure criterion The array-and-join expression yields alice, bob, and 429 for Alice's repeat request. The JVM, escaped, and heap subject templates from the prior round continue to pass, including composed and trimmed forms and literal JVM text used in a live expression.
issue (blocking): Keep live subject bindings when a string method ignores a heap template argument.
For ${system['example.subject'].replace('missing', attributes.defaultSubject)}-${attributes.sub}, a JVM value of ${tenant} contains no match for missing, so replace() returns its receiver. If the heap's unused defaultSubject has identical text, HEAD counts the argument as a contributor and compiles ${tenant}-configured at startup, freezing the heap value of attributes.sub. The previous HEAD uses the live suffix and produces ${tenant}-alice and ${tenant}-bob. With tenant = "fixed", current HEAD restores the PR base's shared fixed-configured key and rejects Bob's first request with 429. Track which arguments supply the returned text and preserve the live subject in the no-match case. Filter comparison · Independent identity check · Documented request precedence
Closure criterion With matching text in the JVM property and unused heap argument, each caller retains their live identity suffix and their own quota. Alice's repeat request returns 429.
|
@maximthomas, I addressed both findings from the sixth review. Review · Commit
Both reported scenarios give Alice and Bob separate quotas and return |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The regression tests assert both resolved identities and Alice's repeat-request quota response.
Summary
array()andjoin(). A string replacement contributes template text when its search matches. Guards on the whole request run at request time.Validation
verify.request.mvn -pl openig-ai -am verify. It covers composed and trimmed subject templates, matching text in guards and lookup arguments, and whole-request guards after optional heap member reads.mvn -pl openig-ai -am verify. It covers array composition, unused separators, and matching and nonmatching whole-string replacements.