-
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
Jetty 12.0.x documentation #9096
Merged
sbordet
merged 17 commits into
jetty:jetty-12.0.x
from
gregpoulos:jetty-12.0.x-documentation
Jan 6, 2023
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e74ba85
fix broken include
887ec8e
fix demo module example
75556dc
add documentation markup to fix documentation build error
ad0376d
editorial suggestions for installation instructions
ae02c6c
editorial suggestions for quickstart guide
83ceb33
fix unresolved directive errors
09e98bb
fix file not found exception thrown during doc build
a76327a
editorial suggestions for deployment quickstart, plus some fixed refe…
5221555
Update documentation/jetty-documentation/src/main/asciidoc/operations…
gregpoulos 31759fb
Update documentation/jetty-documentation/src/main/asciidoc/operations…
gregpoulos a2bb352
Update documentation/jetty-documentation/src/main/asciidoc/operations…
gregpoulos f345d08
Update documentation/jetty-documentation/src/main/asciidoc/operations…
gregpoulos 3dcac29
Incorporate suggestions from sbordet
14a5b96
Merge branch 'jetty-12.0.x-documentation' of https://github.com/gregp…
a3d9bc3
Merge branch 'jetty-12.0.x-documentation' of https://github.com/gregp…
e805fc1
Merge branch 'jetty-12.0.x-documentation' of https://github.com/gregp…
ea73512
Use EE10 instead of EE9 in documentation examples
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,29 +27,31 @@ Only modules conforming to the "Servlet Container Profile" with the ServerAuthMo | |
Enable the `jaspi` module: | ||
|
||
---- | ||
include::{JETTY_HOME}/modules/jaspi.mod[] | ||
include::{JETTY_HOME}/modules/ee10-jaspi.mod[] | ||
---- | ||
|
||
[[og-jaspi-xml]] | ||
===== Configure JASPI | ||
|
||
To enable the `jaspi` module you can use the following command (issued from within the `$JETTY_BASE` directory): | ||
Activate the `ee{9,10}-jaspi` module that matches your EE platform version. | ||
|
||
---- | ||
$ java -jar $JETTY_HOME/start.jar --add-modules=jaspi | ||
$ java -jar $JETTY_HOME/start.jar --add-modules=ee10-jaspi | ||
---- | ||
|
||
You can then register a `AuthConfigProvider` onto the static `AuthConfigFactory` obtained with `AuthConfigFactory.getFactory()`. This registration can be done in the XML configuration file which will be copied to `$JETTY_BASE/etc/jaspi/jaspi-authmoduleconfig.xml` when the module is enabled. | ||
|
||
====== JASPI Demo | ||
The `jaspi-demo` module illustrates setting up HTTP Basic Authentication using a Jakarta Authentication module that comes packaged with jetty: `org.eclipse.jetty.security.jaspi.modules.BasicAuthenticationAuthModule`, and applies it for a context named `/test`. | ||
The `ee9-jaspi-demo` and `ee10-jaspi-demo` modules illustrate setting up HTTP Basic Authentication using the EE9 and EE10 Jakarta Authentication modules that come packaged with Jetty. | ||
|
||
The following example uses Jetty's EE10 implementation of `AuthConfigProvider` to register a `ServerAuthModule` directly. | ||
|
||
[source, xml] | ||
---- | ||
include::{JETTY_HOME}/etc/jaspi/jaspi-demo.xml[] | ||
include::{JETTY_HOME}/etc/jaspi/jetty-ee10-jaspi-demo.xml[] | ||
---- | ||
|
||
This example uses the `AuthConfigProvider` implementation provided by Jetty to register a `ServerAuthModule` directly. Other custom or 3rd party modules that are compatible with the `ServerAuthModule` interface in JASPI can be registered in the same way. | ||
Other custom or 3rd party modules that are compatible with the `ServerAuthModule` interface in JASPI can be registered in the same way. | ||
|
||
===== Integration with Jetty Authentication Mechanisms | ||
|
||
|
@@ -61,8 +63,8 @@ The `CallerPrincipalCallback` and `GroupPrincipalCallback` do not require use of | |
|
||
Jetty provides an implementation of the `AuthConfigFactory` interface which is used to register `AuthConfigProviders`. This can be replaced by a custom implementation by adding a custom module which provides `auth-config-factory`. | ||
This custom module must reference an XML file which sets a new instance of the `AuthConfigFactory` with the static method `AuthConfigFactory.setFactory()`. | ||
For an example of this see the `jaspi-default-auth-config-factory` module, which provides the default implementation used by Jetty. | ||
For an example of this see the `ee{9,10}-jaspi-default-auth-config-factory` module, which provides the default implementation used by Jetty. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
---- | ||
include::{JETTY_HOME}/modules/jaspi-default-auth-config-factory.mod[] | ||
---- | ||
include::{JETTY_HOME}/modules/ee9-jaspi-default-auth-config-factory.mod[] | ||
gregpoulos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
---- |
This file contains 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
Oops, something went wrong.
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.
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 a module exists for ee9, then it should also exist for ee8, since we mechanically generate ee8 from ee9.
I'd say to always use
ee{8,9,10}
everywhere so hereee{9,10}
->ee{8,9,10}
.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.
That's odd – when I run
java -jar $JETTY_HOME/start.jar --list-modules=* | grep jaspi
I get: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.
@olamy do you know whether there is a
ee8-jaspi
module?