1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[JBoss] Securing webapp (or ws) in wildfly 14

Discussão em 'StackOverflow' iniciado por Stack, Julho 18, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to configure security for a webservice inside an ear.

    I did configure properties realm, security domain, http authentication factory and undertow application security domain:

    [standalone@localhost:9990 /] /subsystem=elytron/http-authentication-factory=testHAF:query()
    {
    "outcome" => "success",
    "result" => {
    "available-mechanisms" => ["BASIC"],
    "http-server-mechanism-factory" => "global",
    "mechanism-configurations" => [{
    "mechanism-name" => "BASIC",
    "mechanism-realm-configurations" => [{"realm-name" => "TestDomain"}]
    }],
    "security-domain" => "TestSD"
    }
    }

    [standalone@localhost:9990 /] /subsystem=undertow/application-security-domain=TestASD:query()
    {
    "outcome" => "success",
    "result" => {
    "enable-jacc" => false,
    "http-authentication-factory" => "testHAF",
    "override-deployment-config" => false,
    "referencing-deployments" => undefined,
    "security-domain" => undefined,
    "setting" => undefined
    }
    }


    I have a war inside an ear.

    The ear does not have jboss specific files.

    The war has both a jboss-web.xml:

    <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.jboss.org/schema/jbossas
    http://www.jboss.org/schema/jbossas/jboss-web_7_2.xsd">
    <security-domain>TestASD</security-domain>
    </jboss-web>


    and a jboss-ejb3.xml:

    <?xml version="1.1" encoding="UTF-8"?>
    <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:s="urn:security:1.1"
    xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd"
    version="3.1"
    impl-version="2.0">
    </jboss:ejb-jar>


    Yet when I deploy the ear, I get an error that "jboss.security.security-domain.TestASD" is not found:

    12:13:07,128 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "ear-module-1.0-SNAPSHOT.ear")]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.security.security-domain.TestASD"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
    "jboss.ws.endpoint.\"ear-module-1.0-SNAPSHOT.ear\".\"com.example-web-module-1.0-SNAPSHOT.war\".\"com.example.web.HelloWsWar\" is missing [jboss.security.security-domain.TestASD]",
    "jboss.deployment.subunit.\"ear-module-1.0-SNAPSHOT.ear\".\"com.example-web-module-1.0-SNAPSHOT.war\".component.HelloBean.CREATE is missing [jboss.security.security-domain.TestASD]"
    ]
    }


    What I am doing wrong? TIA

    Continue reading...

Compartilhe esta Página