Skip to content

Update OpenIG documentation to match runtime configuration - #200

Merged
vharseko merged 7 commits into
OpenIdentityPlatform:masterfrom
vharseko:docs/refresh-asciidoc
Nov 27, 2026
Merged

vharseko merged 7 commits into
OpenIdentityPlatform:masterfrom
vharseko:docs/refresh-asciidoc

Conversation

@vharseko

@vharseko vharseko commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Refresh the Gateway Guide and How-To guides, including downloadable configurations and scripts.
  • Align the Configuration Reference with the heap registry, configuration readers, expression bindings, and audit handlers shipped in the WAR.
  • Correct time addition in EL. Preserve fixed LLM proxy subjects and EL templates from JVM properties, escaped EL, and heap configuration. Configuration-only heap members can select a subject at startup. HTTP Request members use the current request even when the heap declares a member with the same name. Composed and trimmed templates retain per-request identities, including templates passed through array() and join(). A string replacement contributes template text when its search matches. Guards on the whole request run at request time.
  • Normalize line endings in the logout script tests and configure upstreams for the password replay route templates.
  • Add an Antora preview build and rendered link validation to CI.

Validation

  • The documentation refresh passed 370 selected unit and integration tests under Maven verify.
  • The first review follow-up passed 139 tests on each of JDK 11 and 27. Coverage includes all four logout cases with CRLF input, independent LLM quotas across subject configuration forms, and outbound routing for six password replay templates.
  • The heap binding follow-up passed 1,219 tests on JDK 11 across OpenIG AI and its dependencies, plus 67 focused tests on JDK 27. The regression tests check separate quotas for heap-supplied subject templates and direct URI access with a heap property named request.
  • The third review follow-up passed 1,224 tests on JDK 11 and 72 focused tests on JDK 27. It covers optional heap members, runtime attributes in guards, trimmed heap templates, and EL-like text used as a literal.
  • The fourth review follow-up passed 1,231 tests on JDK 11 across OpenIG AI and its dependencies, plus 79 focused tests on JDK 27. It covers string guards, fixed heap subjects, JVM templates selected by heap conditions, and HTTP Request member precedence.
  • The fifth review follow-up passed 87 focused tests on JDK 11 and 1,243 tests on JDK 27 with 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.
  • The sixth review follow-up passed 153 focused tests on JDK 11 and 1,248 tests on JDK 27 with mvn -pl openig-ai -am verify. It covers array composition, unused separators, and matching and nonmatching whole-string replacements.
  • The Python link checkers passed 32 tests.
  • Antora rendered 49 OpenIG pages with no broken local links. The Configuration Reference PDF also rendered.
  • All seven audit handler classes accepted their sample configurations using the WAR dependencies. Local checks exercised CSV, JSON file, and JSON stdout delivery.

@vharseko vharseko added the documentation Improvements or additions to documentation label Nov 26, 2026
@vharseko
vharseko requested a review from maximthomas November 26, 2026 10:40

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

HowToScriptsTest.java:289

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.

LLMProxyFilter.java:284

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.

chap-quickstart.adoc:108

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.

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I addressed the three findings in the follow-up commit.

  • The logout tests share the line reader used by the other inline script examples. All four logout cases passed with CRLF input on JDK 11 and 27.
  • The filter compiles legacy EL templates from JVM properties and escaped configuration when it is created, then evaluates them per request. Direct expressions can use both heap properties and request bindings. Regression tests verify separate identities and token quotas for these forms, including a conditional template.
  • The five reported password replay routes now declare their upstream at route level. The Outlook Web Access template had the same routing issue and received the same correction. The tests load all six templates with the documented Quickstart, check the outbound URI, and verify that the Simple Login Form POST retains its configured login URI.

The focused Maven verification passed 139 tests on each JDK. Follow-up commit

@vharseko
vharseko requested a review from maximthomas November 26, 2026 12:09
@vharseko vharseko added java Pull requests that update Java code tests Adds or updates tests ci Build, CI/CD, and GitHub Actions changes ai AI / LLM proxy features (openig-ai) labels Nov 26, 2026

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vharseko

Copy link
Copy Markdown
Member Author

@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 request, including conditional and composite expressions. They verify separate identities and quotas for two users and exercise direct URI reads with the same heap configuration. The JVM property and escaped-template cases also pass.

Maven passed 1,219 tests on JDK 11 and 67 focused tests on JDK 27. Follow-up commit

@vharseko
vharseko requested a review from maximthomas November 26, 2026 13:09

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Expression.java:266

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.

Expression.java:250

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.

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas Both third-round cases are covered in the follow-up.

  • Startup evaluation of a heap-provided template now uses normal EL semantics for missing members. The optional request.override case selects request.defaultSubject and gives the two users separate identities and quotas.
  • Direct expressions keep the request bindings. With an empty heap property named attributes, the empty attributes guard uses the populated request attributes and produces example-alice and example-bob.

Additional tests check template selection through trim() and preserve literal JVM text when an equal heap string is read only in a condition. Legacy JVM, escaped, and heap template cases and direct URI reads remain covered.

Maven passed 1,224 tests on JDK 11 and 72 focused tests on JDK 27. Follow-up commit

@vharseko
vharseko requested a review from maximthomas November 26, 2026 14:03

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

LLMProxyFilter.java:380–385

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.

LLMProxyFilter.java:354–363

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.

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas The follow-up covers both findings from this round.

  • Compatibility evaluation uses the original heap values, so startsWith('$') selects the configured template. The regression test checks that it gives the two users separate identities and quotas.
  • Configuration-only members of a heap property named request can supply a fixed subject such as service-account or select a JVM template through a condition. Actual HTTP Request members are resolved from the current request, including uri when the heap also defines it.

The tests also cover a JVM template selected after a missing optional member, an empty heap string named request, and a runtime guard whose JVM text happens to match a heap template.

Maven passed 1,231 tests on JDK 11 and 79 focused tests on JDK 27. Follow-up commit

@vharseko
vharseko requested a review from maximthomas November 26, 2026 15:11

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

LLMProxyFilter.java:453–459

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.

LLMProxyFilter.java:411–425

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.

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas, I addressed both findings from the fifth review. Review · Commit

  • Composed heap templates and templates passed through trim() keep the text supplied by the selected result. EL guards see the original values. The regression tests cover a JVM guard that reads identical text, trimming the whole heap request binding, and matching text used as a lookup key or an unused default.
  • A guard on the whole request defers subject evaluation to request time even after a missing request.override read. The regression tests exercise both attributes.sub and request.uri.path. Heap-only defaults still resolve at startup.

The tests verify that Alice and Bob each get an independent quota and that Alice's repeat request returns 429. The focused run passed 87 tests on JDK 11. The mvn -pl openig-ai -am verify run passed 1,243 tests on JDK 27.

@vharseko
vharseko requested a review from maximthomas November 26, 2026 16:33

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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().

LLMProxyFilter.java:451–466

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.

LLMProxyFilter.java:483–501

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.

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas, I addressed both findings from the sixth review. Review · Commit

  • array() keeps the template source with each element. join() carries those sources through to its result and considers a separator when it actually inserts one. The regression test verifies that join(array(attributes.defaultSubject), '') yields alice and bob.
  • String.replace() considers the replacement text when the search matches. With no match, ${tenant} stays literal and the live request supplies the identity suffix. EL now resolves two string arguments to the CharSequence overload on both JDKs. The tests cover a replacement that inserts a heap template as well.

Both reported scenarios give Alice and Bob separate quotas and return 429 on Alice's repeat request. The focused JDK 11 run passed 153 tests. The mvn -pl openig-ai -am verify run passed 1,248 tests on JDK 27.

@vharseko
vharseko requested a review from maximthomas November 26, 2026 18:53

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The regression tests assert both resolved identities and Alice's repeat-request quota response.

@vharseko
vharseko merged commit 4784937 into OpenIdentityPlatform:master Nov 27, 2026
15 checks passed
@vharseko
vharseko deleted the docs/refresh-asciidoc branch November 27, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai AI / LLM proxy features (openig-ai) ci Build, CI/CD, and GitHub Actions changes documentation Improvements or additions to documentation java Pull requests that update Java code tests Adds or updates tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants