Jetty returning 403 Forbidden
16,713
Likely cause: your war/webapp has security constraints defined, but you haven't specified what authentication type to use on the server side.
Either:
- Remove your
<security-constraint>
in your war/webappWEB-INF/web.xml
file. or.. - Add an Authentication scheme on the server side. Look at
etc/jetty-testrealm.xml
for an example using the HashLoginService authenticator.
Related videos on Youtube
Author by
subodh
Updated on July 03, 2022Comments
-
subodh almost 2 years
Hi I am porting my web app from tomcat to Jetty. I am using the Jetty runner to launch it. I am using the following command to launch Jetty:
java -jar jetty-runner.jar --port --path url-path path-to-war
However when I try to browse to the from the browser I get the following error:
HTTP ERROR 403
Problem accessing . Reason:
Forbidden
In the logs i see the following Warning:
WARN:oejs.SecurityHandler:No authenticator for: {RoleInfo,C[*, all_auth_users]}
I am trying to use Jetty out of the box and haven't customized any config anywhere. Is there any additional configuration required to make this work?
-
Joakim Erdfelt over 11 yearsLikely cause: your war has security constraints defined, but you haven't specified what authentication type to use on the server side. look at
etc/jetty-testrealm.xml
for an example using the HashLoginService authenticator. -
subodh over 11 yearsYes, the web.xml indeed had a security-constraint defined, removing that has resolved the issue, thank you so much!
-