undertow | High performance non-blocking webserver | HTTP library

 by   undertow-io Java Version: 2.2.25.Final License: Apache-2.0

kandi X-RAY | undertow Summary

kandi X-RAY | undertow Summary

undertow is a Java library typically used in Networking, HTTP applications. undertow has no bugs, it has build file available, it has a Permissive License and it has high support. However undertow has 19 vulnerabilities. You can download it from GitHub, Maven.

Undertow is a Java web server based on non-blocking IO. It consists of a few different parts:. Project Lead: Flavia Rainone . Mailing List: undertow-dev@lists.jboss.org
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              undertow has a highly active ecosystem.
              It has 3373 star(s) with 960 fork(s). There are 199 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              undertow has no issues reported. There are 54 open pull requests and 0 closed requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of undertow is 2.2.25.Final

            kandi-Quality Quality

              undertow has 0 bugs and 0 code smells.

            kandi-Security Security

              OutlinedDot
              undertow has 19 vulnerability issues reported (3 critical, 11 high, 5 medium, 0 low).
              undertow code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              undertow is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              undertow releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              undertow saves you 142931 person hours of effort in developing the same functionality from scratch.
              It has 152884 lines of code, 12774 functions and 1425 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed undertow and discovered the below as its top functions. This is intended to give you an instant insight into undertow implemented functionality, and help decide if they suit your requirements.
            • write state machine code
            • Process a stateful write .
            • Initialize the servlets .
            • Helper method to create the send frame header .
            • Unwrap data .
            • Creates a new HTTP2 frame .
            • Sends a resource to the client .
            • Receives the next frame from the receiver .
            • Handles the digest header .
            • Process the request .
            Get all kandi verified functions for this library.

            undertow Key Features

            No Key Features are available at this moment for undertow.

            undertow Examples and Code Snippets

            No Code Snippets are available at this moment for undertow.

            Community Discussions

            QUESTION

            jshell use external dependency from Maven repository
            Asked 2022-Feb-22 at 11:54

            I'd like to use JShell to launch a Class which is contained in a Maven repository:

            ...

            ANSWER

            Answered 2022-Feb-22 at 11:54

            If you don't have a pom.xml with all your dependencies listed, a simple solution is to symlink or copy the jars you need to a single directory, say $HOME/.java/lib and launch jshell like this:

            Source https://stackoverflow.com/questions/71101377

            QUESTION

            Keycloak Identity Broker: HMACSHA256 Signature not available
            Asked 2022-Feb-09 at 16:03

            I'm running Keycloak 15.0.2 in docker (jboss/keycloak:15.0.2) and use Identity Brokering with an external OpenId Connect Identity Provider

            When a login is initialized on keycloak the browser is redirected to the external IDP. After authenticated there the browser is redirected to keycloaks broker endpoint /broker/oidc/endpoint?code=xxx

            But then Keycloak throws a Exception caused by

            Caused by: java.security.NoSuchAlgorithmException: HMACSHA256 Signature not available

            Has someone an idea why this is happening? Should this HMACSHA256 algorithm not already be part of the JRE in the docker-container?

            Full stacktrace

            ...

            ANSWER

            Answered 2022-Feb-09 at 16:03

            I had the same issue and could solve it by changing the "Client Assertion Signature Algorithm" from HS256 to RS256 for the identity provider in Keycloak.

            Source https://stackoverflow.com/questions/71051614

            QUESTION

            How to allow several different origins in Wildfly 10
            Asked 2022-Jan-25 at 21:38

            My goal is to allow several BUT NOT ALL origins for http requests to my Wildfly 10. I have searched StackOverflow and haven't found anything so far on this topic. People all over the Internet suggest using a wildcard, however this could effectively be a security flaw. Yes, a wildcard for Access-Control-Allow-Origin does work, but I don't want to allow just any origin. I have tried this standalone.xml part for undertow subsystem (unsuccessfully):

            ...

            ANSWER

            Answered 2022-Jan-25 at 21:38

            This nice article is explaining one way to do it, using an Undertow expression-filter validating origin against some whitelisted domains (modelled as a multi-valued|-separated list):

            Source https://stackoverflow.com/questions/70851239

            QUESTION

            Keycloak Wildfly auth method
            Asked 2022-Jan-21 at 14:29

            I have created a wildfly container (wildfly 25.0.1 and keycloak 15.0.2) with the keycloak as subsystem. I have also a running keycloak container. Trying to deploy a simple jakarta app (build as war via maven and upload it into the wildfly) with a web.xml as follow leads to the following error:

            ...

            ANSWER

            Answered 2022-Jan-10 at 16:50

            Keycloak has deprecated the Wildfly-Adapter in Favour of the built in Elytron OIDC-Authenticator. https://www.keycloak.org/2021/12/keycloak-1510-released

            You can check whether that meets your requirements, or stick with Wildfly 24 for now.

            See https://wildfly-security.github.io/wildfly-elytron/blog/securing-wildfly-apps-openid-connect/ for more infos about using the built in authentication with Elytron.

            Source https://stackoverflow.com/questions/70001644

            QUESTION

            wildfly 16, log4j 2.17.0, NoSuchFieldError: EMPTY_BYTE_ARRAY
            Asked 2022-Jan-11 at 17:22

            I get an error during wildfly startup with the following message:

            NoSuchFieldError: EMPTY_BYTE_ARRAY

            The message also say that this error occurs in undertow deployment. Could anybody give me a hint of what is going on here and how to solve that?

            Below is the beginning of the stack trace.

            ...

            ANSWER

            Answered 2021-Dec-26 at 15:35

            You need to exclude the API module from your deployment. Your other option is to use WildFly 26 which include the 2.16 version of the API.

            Source https://stackoverflow.com/questions/70474648

            QUESTION

            my Spring CustomSecurityExpressionRoot not working
            Asked 2021-Dec-15 at 15:04

            I created a New Security Expression in my spring project but it not working. Here is my code.

            Firstly, i make a CustomPermissionEvaluator which implement PermissionEvaluator:

            ...

            ANSWER

            Answered 2021-Dec-15 at 15:04

            Generally don't use a custom MethodSecurityExpressionOperations instead just write a class which does what you want. Register that as a bean (make it an @Component) and reference that in your expression.

            Something like the following

            Source https://stackoverflow.com/questions/70364411

            QUESTION

            Why does this simple Jakarta Security example from Soteria work on Payara but not on WildFly?
            Asked 2021-Dec-06 at 20:16

            I'm used to using WildFly for Java/Jakarta EE development and lately I wanted to update a project that is using JAAS for authentication/authorization to the new Jakarta Security API from Jakarta EE 9.1.

            I couldn't make it work, so I decided to create the simplest example possible and experiment on different application servers. I took an example from Soteria (as I understand, the reference implementation for Jakarta Security) and created a new Jakarta EE project to deploy on my application servers. The code is available here.

            The example includes a very simple identity store for a user reza with password secret1:

            ...

            ANSWER

            Answered 2021-Dec-06 at 20:16
            Solution

            The WildFly server needs additional configuration:

            1. Edit the other Application Security Domain, set the Integrated JASPI property to off.

            2. Reload the server

            There is also a script for this on: https://github.com/wildfly/quickstart/tree/main/ee-security#configure-the-server

            Why? What is Integrated JASPI?

            From https://docs.wildfly.org/25/WildFly_Elytron_Security.html#Elytron_and_Java_EE_Security

            The EE Security API is built on JASPI. Within JASPI we support two different modes of operation 'integrated', and 'non-integrated'. In integrated mode any identity being established during authentication is expected to exist in the associated security domain. With the EE Security APIs however it is quite likely an alternative store will be in use so configuration the mapping to use 'non-integrated' JASPI allows for identities to be dynamically created as required.

            Source https://stackoverflow.com/questions/70225352

            QUESTION

            Direct buffer memory OutOfMemoryError after updating to wildfly 18
            Asked 2021-Nov-18 at 11:04

            After updating the environment from Wildfly 13 to Wildfly 18.0.1 we experienced an

            ...

            ANSWER

            Answered 2021-Nov-05 at 14:19

            QUESTION

            docker build command tryies to connect https to insecure registry
            Asked 2021-Nov-09 at 07:46

            I have an issue to build my image, because docker build is connnecting via https.

            ...

            ANSWER

            Answered 2021-Nov-08 at 08:28

            I had to set DOCKER_BUILDKIT=0 before build command

            Source https://stackoverflow.com/questions/69871759

            QUESTION

            MicroProfile Metrics do not show custom metrics on Wildfly 25
            Asked 2021-Nov-02 at 16:03

            I am experimenting with Javax/JaxRs and I am using the WildFly 25 server, which I am not quite familiar with.

            Searching for something similar to Spring's Actuator, I stumbled across the metrics & health endpoints the server exposes by default, and its ability to add custom counters, gauges etc. to application endpoints.

            However, whatever I do, these custom endpoints are not exposed under the default http://localhost:9990/metrics URL.

            I am following the guide provided by WildFly under the GitHub repository: https://github.com/wildfly/quickstart/tree/main/microprofile-metrics

            There are some "red flags" on the tutorial that do not seem to be working with whatever I try to do.

            1. The guide suggests that if we want to get the metrics in JSON format, we need to use the following header: "Accepted: application/json", which still returns the default Prometheus format, both in Postman and Curl.
            2. The guide also suggests that metrics/vendor, metrics/application, metrics/base return metrics of different scopes, which to my test, they all return the same.

            As far as the tutorial code is concerned, I tried running it on the Jakarta EE 8 Full & Web Distribution but it throws the following error:

            Artifact microprofile-metrics:war exploded: java.lang.Exception: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"microprofile-metrics.war\".undertow-deployment" => "java.lang.NoClassDefFoundError: org/eclipse/microprofile/metrics/Counter Caused by: java.lang.NoClassDefFoundError: org/eclipse/microprofile/metrics/Counter

            I tried compiling the code with different versions of Java (1.8, 11, 17) hoping that it may fix the problem but to no avail.

            However, using the WildFly Preview EE 9.1 Distribution seems to stop throwing the error, but the custom metrics still do not to work.

            There are the subsystems that I added to both distributions during my tries (taken from standalone.xml):

            ...

            ANSWER

            Answered 2021-Nov-02 at 16:03

            John. I'm the Metrics/MP Metrics component lead for WildFly, so hopefully I can help get you sorted out.

            Before I get too excited about digging through the WF source, can you confirm which configuration you're using? It looks like you're using standalone.xml configuration. While that does have a metrics extension, it's not MP Metrics. For that, you would need to use standalone-microprofile.xml.

            Hopefully, your issue is as simple as that. If not, let me know, and we'll dig deeper. :)

            Source https://stackoverflow.com/questions/69479379

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            A flaw was found in Undertow. A regression in the fix for CVE-2020-10687 was found. HTTP request smuggling related to CVE-2017-2666 is possible against HTTP/1.x and HTTP/2 due to permitting invalid characters in an HTTP request. This flaw allows an attacker to poison a web-cache, perform an XSS attack, or obtain sensitive information from request other than their own. The highest threat from this vulnerability is to data confidentiality and integrity.
            A flaw was found in the Undertow AJP connector. Malicious requests and abrupt connection closes could be triggered by an attacker using query strings with non-RFC compliant characters resulting in a denial of service. The highest threat from this vulnerability is to system availability. This affects Undertow 2.1.5.SP1, 2.0.33.SP2, and 2.2.3.SP1.
            A flaw was discovered in all versions of Undertow before Undertow 2.2.0.Final, where HTTP request smuggling related to CVE-2017-2666 is possible against HTTP/1.x and HTTP/2 due to permitting invalid characters in an HTTP request. This flaw allows an attacker to poison a web-cache, perform an XSS attack, or obtain sensitive information from request other than their own.
            CVE-2019-3888 CRITICAL
            A vulnerability was found in Undertow web server before 2.0.21. An information exposure of plain text credentials through log files because Connectors.executeRootHandler:402 logs the HttpServerExchange object at ERROR level using UndertowLogger.REQUEST_LOGGER.undertowRequestFailed(t, exchange)
            An information leak vulnerability was found in Undertow. If all headers are not written out in the first write() call then the code that handles flushing the buffer will always write out the full contents of the writevBuffer buffer, which may contain data from previous requests.
            In Undertow before versions 7.1.2.CR1, 7.1.2.GA it was found that the fix for CVE-2016-4993 was incomplete and Undertow web server is vulnerable to the injection of arbitrary HTTP headers, and also response splitting, due to insufficient sanitization and validation of user input before the input is used as part of an HTTP header value.
            CVE-2020-1745 CRITICAL
            A file inclusion vulnerability was found in the AJP connector enabled with a default AJP configuration port of 8009 in Undertow version 2.0.29.Final and before and was fixed in 2.0.30.Final. A remote, unauthenticated attacker could exploit this vulnerability to read web application files from a vulnerable server. In instances where the vulnerable server allows file uploads, an attacker could upload malicious JavaServer Pages (JSP) code within a variety of file types and trigger this vulnerability to gain remote code execution.
            A flaw was discovered in Undertow in versions before Undertow 2.1.1.Final where certain requests to the "Expect: 100-continue" header may cause an out of memory error. This flaw may potentially lead to a denial of service.
            A flaw was found in Undertow in versions before 2.1.1.Final, regarding the processing of invalid HTTP requests with large chunk sizes. This flaw allows an attacker to take advantage of HTTP request smuggling.
            A flaw was found in all undertow-2.x.x SP1 versions prior to undertow-2.0.30.SP1, all undertow-1.x.x and undertow-2.x.x versions prior to undertow-2.1.0.Final, where the Servlet container causes servletPath to normalize incorrectly by truncating the path after semicolon which may lead to an application mapping resulting in the security bypass.
            A vulnerability was found in the Undertow HTTP server in versions before 2.0.28.SP1 when listening on HTTPS. An attacker can target the HTTPS port to carry out a Denial Of Service (DOS) to make the service unavailable on SSL.
            A flaw was found in, all under 2.0.20, in the Undertow DEBUG log for io.undertow.request.security. If enabled, an attacker could abuse this flaw to obtain the user's credentials from the log files.
            It was found that URLResource.getLastModified() in Undertow closes the file descriptors only when they are finalized which can cause file descriptors to exhaust. This leads to a file handler leak.
            In Undertow 2.x before 2.0.0.Alpha2, 1.4.x before 1.4.17.Final, and 1.3.x before 1.3.31.Final, it was found that the fix for CVE-2017-2666 was incomplete and invalid characters are still allowed in the query string and path parameters. This could be exploited, in conjunction with a proxy that also permitted the invalid characters but with a different interpretation, to inject data into the HTTP response. By manipulating the HTTP response the attacker could poison a web-cache, perform an XSS attack, or obtain sensitive information from requests other than their own.
            It was discovered in Undertow that the code that parsed the HTTP request line permitted invalid characters. This could be exploited, in conjunction with a proxy that also permitted the invalid characters but with a different interpretation, to inject data into the HTTP response. By manipulating the HTTP response the attacker could poison a web-cache, perform an XSS attack, or obtain sensitive information from requests other than their own.
            undertow before versions 1.4.18.SP1, 2.0.2.Final, 1.4.24.Final was found vulnerable when using Digest authentication, the server does not ensure that the value of URI in the Authorization header matches the URI in HTTP request line. This allows the attacker to cause a MITM attack and access the desired content on the server.

            Install undertow

            You can download it from GitHub, Maven.
            You can use undertow like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the undertow component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/undertow-io/undertow.git

          • CLI

            gh repo clone undertow-io/undertow

          • sshUrl

            git@github.com:undertow-io/undertow.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular HTTP Libraries

            requests

            by psf

            okhttp

            by square

            Alamofire

            by Alamofire

            wrk

            by wg

            mitmproxy

            by mitmproxy

            Try Top Libraries by undertow-io

            undertow.js

            by undertow-ioJava

            jastow

            by undertow-ioJava

            undertow-docs

            by undertow-ioShell

            undertow.js-examples

            by undertow-ioHTML

            undertow-subsystem

            by undertow-ioJava