{{ message }}
Repository navigation
Conversation
- Add an opt-in `authentication` option to the lifecycle recorder that also records /api/security/ticket, /api/login and /api/login/logout, keeps each redirect hop with its location and no body, and records a failed sign-in request as a `failed` record - Keep only the path of a Location header in both formats and drop values that cannot be parsed - Accept `failed` records only in lifecycle validation, with non-empty error text - Reject captures with sign-in requests, failed records or a location header in lifecycle replay - Document the contract change in the core-contract README
Signing in after a session expires starts several ticket checks whose redirects overlap, so the order of records cannot tell which /api/login hop came from which request. With the authentication option, a redirected request now names the request it was redirected from in `redirectedFrom`, and lifecycle validation requires that request to come earlier in the same session.
Move writeWithoutAccountNames from the read fixture spec to the lifecycle capture helpers so the authentication captures can mask account names the same way. The read fixture spec only changes its imports.
Record permission writes by owner, non-owner, role owner, unauthenticated and anonymous callers, a signed-in logout, an HTTP-only session expiry, global AUTH_INFO and ERROR_INFO, read failures beside a global error, and SESSION_LOGOUT after a logout and after a server restart. A REST 401 with a Location is kept as a skipped row because this server never sends one. The inventory test pins the fixture list, provenance and redaction, and checks each row against the server and host behaviour it records.
A command sent on a ticket with no entry gets no reply, so the capture can only show that it was dropped by waiting a quiet period. Mark both waits as the e2e conventions require.
…erceptors Drive the production AppHttpInterceptor and AppMessageInterceptor with the notebook-auth captures: - each captured 405 on a request that is not the logout starts one logout - the captured logout 401 has no Location and leaves the page as it is; a synthetic 401 with Location covers the redirect the server never sends - a global AUTH_INFO or ERROR_INFO is shown by the shell without changing the ticket - SESSION_LOGOUT is left unhandled
…master The read msgId change is now on Apache master, so read-anonymous.json and read-denied.json are recaptured from bf65886 and name apache/zeppelin as their source. The WebSocket messages and the record count are unchanged. Besides new IDs and timestamps, the permissions REST responses now arrive before the NOTE, ERROR_INFO and AUTH_INFO frames they used to follow. Order between REST and WebSocket was never defined, and the read replay passes on both captures.
…7 handoff Describe the notebook-auth fixtures, the two capture runs against the baseline helper, and the sign-in failure seen after the in-test server restart, whose cause is not yet known. The handoff table lists what a ZEPPELIN-6727 consumer checks for each capture and who owns that behavior.
xhaktm00
force-pushed
the
ZEPPELIN-6673
branch
from
October 21, 2026 10:25
9fe2896 to
307b451
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What is this PR for?
Capture how the server and the Angular shell behave around note permissions, sign-in and session expiry, so that ZEPPELIN-6727 can check its consumer against recorded behavior instead of rules copied from client code. This PR records behavior only. It does not change server, shell or Core code.
Recording.
createLifecycleRecorder(metadata, { authentication: true })also records/api/security/ticket,/api/loginand/api/login/logout. Each redirect hop is recorded as its own request with itslocationand no body, and names the request it was redirected from inredirectedFrom, because logout cycles overlap and request order alone cannot pair them. A failed sign-in request becomes afailedrecord, while a failed notebook request still fails capture.writeWithoutAccountNamesmoves unchanged fromread-fixtures.spec.ts(ZEPPELIN-6737) tolifecycle/capture.ts, so both capture specs replace account names with<user>.Captures.
notebook-auth-fixtures.spec.tsrecords 12 rows intoe2e/fixtures/notebook-auth/with a manifest, andnotebook-auth-captures.test.mjschecks the inventory, provenance, redaction and each row's behavior. The shell rows are replayed through the productionAppHttpInterceptorandAppMessageInterceptor.Captured behavior
acl-write.json200, non-owner403acl-write-role-owner.jsonacl-write-unauthenticated.json302to/api/login, which answers405acl-write-anonymous.json200)rest-401-logout.json401with noLocationrest-401-with-location.json401withLocation(needs an SSO realm such as Knox)http-session-expired.json405on a request that is not the logoutws-global-auth-info.jsonAUTH_INFOwithout msgId; later reads on the same socket succeedws-global-error-info.jsonERROR_INFOwithout msgIdws-read-correlation.jsonERROR_INFOws-session-logout.jsonSESSION_LOGOUT(no msgId)session-expiry-server-restart.jsonPoints for review
locationnow survives header filtering in both fixture formats, reduced to its path (no host, query or path parameters; an unparseable value is dropped).failedrecords are accepted only in lifecycle captures, and lifecycle replay rejects a capture containing sign-in requests,failedrecords orlocation. The README is updated in the same PR, as in ZEPPELIN-6672 and ZEPPELIN-6737.NOTE,ERROR_INFOandAUTH_INFOframes they used to follow. Order between REST and WebSocket is not defined, and the read replay passes.metadata.owner, the package that keeps the capture.SESSION_LOGOUTbelongs to the Angular shell (session foundation) and nothing handles it yet.read-fixtures.spec.ts:57has a TypeScript conversion error that was hidden because that spec is not in the core-contract tsconfig. This PR does not add it there.What type of PR is it?
Improvement
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6673
How should this be tested?
From
zeppelin-web-angular:Breaking each new recorder and validation rule (18 changes), each inventory assertion against the captures (10 changes) and each interceptor branch the replay covers made a test fail. The "no reply in between" check of the
SESSION_LOGOUTrows was confirmed only indirectly.Captures were taken against Apache master
bf658867be1067a208d3b41cd07cb0a3feb4ef06, built in a separate clone withcapture/server.shas the README describes:--mode auth): 11 supported, 1 skippedacl-write-anonymous.jsonread-fixturesin anonymous and authenticated mode, both passedNot run locally:
npm run e2e:core-contractand the full E2E suite, Firefox and WebKit.Screenshots (if appropriate)
Questions: