-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix jaas demos #8689
Fix jaas demos #8689
Conversation
@@ -20,7 +20,6 @@ ext | |||
|
|||
[files] | |||
basehome:modules/demo.d/ee10-demo-jaas.xml|webapps/ee10-demo-jaas.xml | |||
basehome:modules/demo.d/ee10-demo-login.conf|etc/ee10-demo-login.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this?
All the config files necessary were in the demo.d
directory and copied to relevant places.
Why is now ee10-demo-login.conf
an exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the ee10-demo-login-conf
file still references module xyz
but should be ee10-xyz
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I made the problem clean in the opening comment of the PR? The problem is that you cannot have more than one jaas config file, so all of the eeX-demo-login.conf files were being ignored. All of the jaas configuration must go into a single file.
@@ -26,14 +26,14 @@ | |||
<!-- This is for convenience so that the src/etc/login.conf file can stay unmodified when copied to $jetty.home/etc directory --> | |||
<jetty.base>${basedir}/src/main/config/modules/demo.d</jetty.base> | |||
<!-- Mandatory. This system property tells JAAS where to find the login module configuration file --> | |||
<java.security.auth.login.config>${basedir}/src/main/config/modules/demo.d/ee8-demo-login.conf</java.security.auth.login.config> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand ee8 demos are derived from ee9 demos with some Maven magic.
As such we should just change the ee9 files, not the ee8 ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
demos cannot be derived from ee9 demos.
they are including some very differents jars etc...
so I couldn;t do it for demos.
core-deploy | ||
|
||
[files] | ||
basehome:modules/demo.d/demo-login.conf|etc/demo-login.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was removed from the eeX versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. As there can only be a single config file.
org.eclipse.jetty.ee8.jaas.spi.PropertyFileLoginModule required | ||
debug="true" | ||
file="${jetty.base}/etc/ee8-demo-login.properties"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is a core demo having eeX configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at jetty-home/src/main/resources/modules/demo.d/
you will see lots of other eeX related config files.
@@ -20,7 +20,6 @@ ext | |||
|
|||
[files] | |||
basehome:modules/demo.d/ee10-demo-jaas.xml|webapps/ee10-demo-jaas.xml | |||
basehome:modules/demo.d/ee10-demo-login.conf|etc/ee10-demo-login.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the ee10-demo-login-conf
file still references module xyz
but should be ee10-xyz
.
@janbartel I'm not sure I follow these changes. Build fails due to circular dependency. If I want to just deploy the ee10 jaas demo, does it work? And why the core demo has a configuration referring to eeX? Are there distribution tests for these demos? |
@sbordet as I've said, the problem I'm trying to fix is that you cannot have multiple jaas config files. Thus you cannot have one for ee8, one for ee9 and one for ee10. All config must be in a single file. As for deploying a single webapp, yes I need to do a bit more work on that. The circular dependency is this:
Having fixed the coordinates of the |
you changed a pom as well ;) and that's probably the reason. |
@janbartel I still don't understand. Are you trying to make the ee-10-demo module depend on the equivalent core module just in case someone deploys multiple eeX jaas demos? |
@olamy but |
@sbordet you need to be able to deploy |
which is real pain when developing/debugging it... :( as you have to build multiple modules first |
@olamy I'm not adding the maven plugin to the demo webapps, it was always there ;) and it used to work. I think it's a reasonable expectation that you could run our demo webapps just like you could run any other webapp with jetty. |
oh right. correct that;s weird that should fail as well in |
There can only be a single jaas configuration file, so changed the demos to that instead of multiple ones (which were being ignored anyway).