jakartaee / jakartaee/authentication
[TCK] Clarification/JASPIC: coordinating CallbackHandler calls to build proper principal.
- Dominant language
- Java
- Stars
- 27
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
While running the TCK against Tomcat I noticed some random failures related to this.
https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jaspic/tssv/module/servlet/TSServerAuthModule.java#L371
What happens is that the module is calling multiple time the callback handler and it fills the subject with multiple principals.
One has only the name and the other one has the name and the group. See picture bellow.

When the container then gets back the Subject from the ServerAuthContext, it pulls either of the 2. If you are lucky and it pulls the principal with the subject, then it works. Otherwise, test fails.
From 3.8.3.1 of the specification
... handle a CallerPrincipalCallback using the clientSubject as argument
to the callback. If more than one module of a context uses the
CallbackHandler to handle this callback, the context is responsible for
coordinating the calls such that the appropriate caller principal value
is established.
So I'm tempted to say it's probably a bug in the TCK.
What are your thoughts on this?
Contributor guide
Research direction
Start at TSServerAuthModule.java around line 371 and reproduce the random TCK failures involving repeated CallbackHandler calls. Compare the observed subject and principal selection with section 3.8.3.1 of the specification to determine whether the TCK or container behavior is at fault. Done means the ownership and expected principal coordination are established and covered by a deterministic test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100