authhelper: Support LLM assisted auth, phase 1 - #7637
Conversation
There was a problem hiding this comment.
Pull request overview
Adds LLM-assisted, multi-step authentication to Auth Helper and converts successful browser actions into a reusable Zest client-authentication script.
Changes:
- Adds the AI authentication method, browser action loop, and Zest generation.
- Integrates AI authentication into configuration and Authentication Tester dialogs.
- Adds documentation, tests, persistence settings, and a development test flow.
Reviewed changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
dev/.../MultiStepAuthHomePageUnitTest.java |
Tests session redirects. |
dev/.../multi-step-auth/step2.html |
Adds department step. |
dev/.../multi-step-auth/password.html |
Adds password step. |
dev/.../multi-step-auth/index.html |
Adds initial login step. |
dev/.../multi-step-auth/home.html |
Adds authenticated page. |
dev/.../TestProxyServer.java |
Registers test flow. |
dev/.../MultiStepAuthVerificationPage.java |
Adds verification endpoint. |
dev/.../MultiStepAuthStep2Page.java |
Serves step two. |
dev/.../MultiStepAuthPasswordPage.java |
Serves password step. |
dev/.../MultiStepAuthLoginPage.java |
Validates login data. |
dev/.../MultiStepAuthHomePage.java |
Protects the home page. |
dev/.../MultiStepAuthDir.java |
Defines test-flow routes. |
authhelper/.../AiAuthZestBuilderUnitTest.java |
Tests Zest generation. |
authhelper/.../AiAuthScriptGeneratorUnitTest.java |
Tests actions and LLM loop. |
authhelper/.../AiAuthSchemaUnitTest.java |
Tests AI JSON schemas. |
authhelper/.../AiAssistedAuthenticationMethodTypeUnitTest.java |
Tests method configuration. |
authhelper/.../AuthTestDialogUnitTest.java |
Tests method selection mapping. |
authhelper/.../AuthhelperParamUnitTest.java |
Tests saved tester method. |
authhelper/.../Messages.properties |
Adds localized UI strings. |
authhelper/.../help/toc.xml |
Adds help navigation. |
authhelper/.../help/map.jhm |
Maps AI help page. |
authhelper/.../help/index.xml |
Indexes AI help. |
authhelper/.../contents/client-script.html |
Documents generated scripts. |
authhelper/.../contents/authhelper.html |
Links AI authentication. |
authhelper/.../contents/auth-tester.html |
Documents tester integration. |
authhelper/.../contents/ai-auth.html |
Documents AI authentication. |
authhelper/.../ExtensionAuthhelperLlm.java |
Registers optional LLM support. |
authhelper/.../AiAuthZestBuilder.java |
Builds replayable Zest scripts. |
authhelper/.../AiAuthTurnPayload.java |
Defines LLM turn payloads. |
authhelper/.../AiAuthSuccessIndicatorType.java |
Defines success indicators. |
authhelper/.../AiAuthSuccessIndicator.java |
Models success detection. |
authhelper/.../AiAuthState.java |
Defines authentication states. |
authhelper/.../AiAuthScriptGenerator.java |
Drives LLM browser automation. |
authhelper/.../AiAuthResult.java |
Models final results. |
authhelper/.../AiAuthResponse.java |
Models LLM responses. |
authhelper/.../AiAuthInputElement.java |
Models page elements. |
authhelper/.../AiAuthActionType.java |
Defines supported actions. |
authhelper/.../AiAuthActionResult.java |
Models action outcomes. |
authhelper/.../AiAuthAction.java |
Models requested actions. |
authhelper/.../AiAssistedAuthenticationMethodType.java |
Implements the authentication method. |
authhelper/.../BrowserBasedAuthenticationMethodType.java |
Reuses shared UI fields. |
authhelper/.../AuthUtils.java |
Adds AI result statistics. |
authhelper/.../AuthTestDialog.java |
Adds AI tester support. |
authhelper/.../AuthMethodOptionsPanelUtils.java |
Extracts shared UI construction. |
authhelper/.../AuthhelperParam.java |
Persists method and hints. |
authhelper/.../AiAssistedAuthTesterSupport.java |
Defines tester integration contract. |
authhelper/CHANGELOG.md |
Records the new functionality. |
authhelper/authhelper.gradle.kts |
Adds the optional LLM extension. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| LlmCommunicationService llm = | ||
| extLlm.getCommunicationService("authhelper-ai-auth", null); |
There was a problem hiding this comment.
Concurrent runs are not possible via the UI. I'm ok with requiring the users to close the tab if they want to loose the history
| java.net.URI uri = new java.net.URI(loginPageUrl); | ||
| String host = uri.getHost(); | ||
| int port = uri.getPort(); | ||
| String hostPart = (port > 0) ? host + ":" + port : host; | ||
| return "AI Auth - " + hostPart; |
There was a problem hiding this comment.
This seems very unlikely to me, so I'm fine with that restriction.
| case SEND_KEYS -> { | ||
| try { | ||
| String value = substituteCredentials(action.value(), username, password); | ||
| element.clear(); | ||
| element.sendKeys(value); |
There was a problem hiding this comment.
The model cannot navigate to another page.
|
New Issues (11)Checkmarx found the following issues in this Pull Request
Fixed Issues (1)Great job! The following issues were fixed in this Pull Request
Use @Checkmarx to interact with Checkmarx PR Assistant. |
37c04d2 to
c3a5acf
Compare
|
Ready for review 😁 |
Signed-off-by: Simon Bennetts <psiinon@gmail.com>
c3a5acf to
915e855
Compare
|
Added Automation Framework support for the method (not LLMs in general). env:
contexts:
- name: LLM Auth Test
urls:
- http://localhost:9091/
includePaths:
- http://localhost:9091/.*
authentication:
method: ai
parameters:
loginPageUrl: http://localhost:9091/auth/multi-step-auth/
loginPageWait: 3
browserId: firefox
hint: "the domain should be Project1"
stepDelay: 2
steps: []
verification:
method: autodetect
sessionManagement:
method: autodetect
technology: {}
structure: {}
users:
- name: testuser
credentials:
password: password123
username: test@test.com
parameters: {}
jobs:
- type: requestor
parameters:
user: testuser
requests:
- url: http://localhost:9091/auth/multi-step-auth/
method: GET
responseCode: 200 |



Add an AI Assisted authentication method which is available via the Authentication tester and the Content / Authentication dialogs.
Does not provide AF support or diagnostic integration - these will be added in future PRs.