Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FISH-9002 EE11 Authentication TCK Runner #118

Merged
merged 23 commits into from
Dec 2, 2024

Conversation

Pandrex247
Copy link
Member

@Pandrex247 Pandrex247 commented Nov 26, 2024

Updates the TCK runner for EE11.

The Profile SPI Servlet 3.1.0 and Profile SPI SOAP 3.1.0 modules still currently fail, and I'm a little unsure if that's being caused by runner config or Payara.

The Servlet tests fail because they seem to have issues writing to the authentication-trace-log.xml file - nothing gets written to it and then the test throws these errors when trying to parse it (as it's an empty file):

org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 2; The markup in the document preceding the root element must be well-formed.
        at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:262)
        at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:342)
        at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
        at ee.jakarta.tck.authentication.test.common.logging.client.LogFileProcessor.fetchLogs(LogFileProcessor.java:144)

The server logs for this test show no obvious errors.

The SOAP tests do manage to correctly write to this authentication-trace-log.xml file, but fail with various authentication and AuthConfigFactory.getConfigProvider exceptions.

[ERROR] Failures:
[ERROR]   SoapProfileSPITest.ACPAuthContext:744
[ERROR]   SoapProfileSPITest.GetConfigProvider:410 GetConfigProvider failed : AuthConfigFactory.getConfigProvider not called
[ERROR]   SoapProfileSPITest.GetFactory:442 GetFactory failed : AuthConfigFactory.getFactory not called
[ERROR]   SoapProfileSPITest.MessageInfo:597 MessageInfo failed : The request and response messages contains incorrect values
[ERROR]   SoapProfileSPITest.OperationId:713
[ERROR]   SoapProfileSPITest.SecureResponse:527 SecureResponse failed : ServerAuthContext.secureResponse not called
[ERROR]   SoapProfileSPITest.ServerAppContextId:847
[ERROR]   SoapProfileSPITest.ServerAuthConfig:472 ServerAuthConfig failed : AuthConfigProvider.getServerAuthConfig not called
[ERROR]   SoapProfileSPITest.ServerAuthContext:554 TSServerAuthConfig.getAuthContext:  layer=SOAP : appContext=localhost /Hello_web/Hello
[ERROR]   SoapProfileSPITest.ServerRuntimeCallbackSupport:676
[ERROR]   SoapProfileSPITest.ServerRuntimeCommonCallbackSupport:638
[ERROR]   SoapProfileSPITest.ValidateRequest:501 ValidateRequest failed : ServerAuthContext.validateRequest not called

The server log again shows no obvious errors.

Counterpart to https://github.com/payara/EngineeringJenkinsjobs/pull/180

Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
Need to commit to remove CRLF

Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
Signed-off-by: Andrew Pielage <[email protected]>
@Pandrex247 Pandrex247 marked this pull request as ready for review November 26, 2024 11:10
To execute the full TCK against a remote Payara Server installation, start your Payara Server and run the follow asadmin command against it, replacing ${tckDir} and ${payaraHome}:

```
create-system-properties j2eelogin.name=j2ee:j2eelogin.password=j2ee:provider.configuration.file=${tckDir}/spi/common/ProviderConfiguration.xml:vendor.authconfig.factory=com.sun.jaspic.config.factory.AuthConfigFileFactory:log.file.location=${payaraHome}/glassfish/domains/domain1/logs
Copy link
Contributor

Choose a reason for hiding this comment

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

Now the provider come from the epicyro implementation

Suggested change
create-system-properties j2eelogin.name=j2ee:j2eelogin.password=j2ee:provider.configuration.file=${tckDir}/spi/common/ProviderConfiguration.xml:vendor.authconfig.factory=com.sun.jaspic.config.factory.AuthConfigFileFactory:log.file.location=${payaraHome}/glassfish/domains/domain1/logs
create-system-properties j2eelogin.name=j2ee:j2eelogin.password=j2ee:provider.configuration.file=${tckDir}/spi/common/ProviderConfiguration.xml:vendor.authconfig.factory=org.glassfish.epicyro.config.factory.file.AuthConfigFileFactory:log.file.location=${payaraHome}/glassfish/domains/domain1/logs

NOTE: On Windows you will need to escape the ':' and '\' characters that will be present on your path variables, due to how the `create-system-properties` parses these characters
For example:
```
create-system-properties "j2eelogin.name=j2ee:j2eelogin.password=j2ee:provider.configuration.file=D\:\\Git\\JakartaEE10-TCK-Runners\\authentication-tck\\target\\authentication-tck-3.1.0\\tck\\spi\\common\\ProviderConfiguration.xml:vendor.authconfig.factory=com.sun.jaspic.config.factory.AuthConfigFileFactory:log.file.location=D\:\\Git\\Payara\\appserver\\distributions\\payara\\target\\stage\\payara7\\glassfish\\domains\\domain1\\logs"
Copy link
Contributor

Choose a reason for hiding this comment

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

same as before:

Suggested change
create-system-properties "j2eelogin.name=j2ee:j2eelogin.password=j2ee:provider.configuration.file=D\:\\Git\\JakartaEE10-TCK-Runners\\authentication-tck\\target\\authentication-tck-3.1.0\\tck\\spi\\common\\ProviderConfiguration.xml:vendor.authconfig.factory=com.sun.jaspic.config.factory.AuthConfigFileFactory:log.file.location=D\:\\Git\\Payara\\appserver\\distributions\\payara\\target\\stage\\payara7\\glassfish\\domains\\domain1\\logs"
create-system-properties "j2eelogin.name=j2ee:j2eelogin.password=j2ee:provider.configuration.file=D\:\\Git\\JakartaEE10-TCK-Runners\\authentication-tck\\target\\authentication-tck-3.1.0\\tck\\spi\\common\\ProviderConfiguration.xml:vendor.authconfig.factory=org.glassfish.epicyro.config.factory.fileAuthConfigFileFactory:log.file.location=D\:\\Git\\Payara\\appserver\\distributions\\payara\\target\\stage\\payara7\\glassfish\\domains\\domain1\\logs"

@breakponchito
Copy link
Contributor

I suspect that probably we need to provided epicyro as a dependency to run the TCK,

@breakponchito breakponchito self-requested a review November 29, 2024 18:28
Copy link
Contributor

@breakponchito breakponchito left a comment

Choose a reason for hiding this comment

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

LGTM, just a few comments but those are not blockers

@Pandrex247 Pandrex247 merged commit acf0c1f into payara:EE11 Dec 2, 2024
@Pandrex247 Pandrex247 deleted the FISH-9002-EE11-Authentication-TCK branch December 2, 2024 11:02
@Pandrex247
Copy link
Member Author

Comments addressed in follow-up PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants